summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Carel <tristan.carel@gmail.com>2019-02-19 15:27:39 +0100
committerMassimiliano Culpo <massimiliano.culpo@gmail.com>2019-02-19 15:27:39 +0100
commitefc34069002f15b9bcbc3e2e93a9ea5b4d4f6512 (patch)
tree32ed4b575b0f8a56ac40805f624f29147548dfc3
parent2242b9f3380b27be6c8ce28a4c896bf8f7156594 (diff)
downloadspack-efc34069002f15b9bcbc3e2e93a9ea5b4d4f6512.tar.gz
spack-efc34069002f15b9bcbc3e2e93a9ea5b4d4f6512.tar.bz2
spack-efc34069002f15b9bcbc3e2e93a9ea5b4d4f6512.tar.xz
spack-efc34069002f15b9bcbc3e2e93a9ea5b4d4f6512.zip
nix: new package added (#9171)
-rw-r--r--var/spack/repos/builtin/packages/libseccomp/package.py25
-rw-r--r--var/spack/repos/builtin/packages/nix/fix-doc-build.patch31
-rw-r--r--var/spack/repos/builtin/packages/nix/package.py59
3 files changed, 115 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/libseccomp/package.py b/var/spack/repos/builtin/packages/libseccomp/package.py
new file mode 100644
index 0000000000..f2cb87b8a5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libseccomp/package.py
@@ -0,0 +1,25 @@
+# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack import *
+
+
+class Libseccomp(AutotoolsPackage):
+ """The main libseccomp repository"""
+
+ homepage = "https://github.com/seccomp/libseccomp"
+ url = "https://github.com/seccomp/libseccomp/archive/v2.3.3.zip"
+
+ version('2.3.3', sha256='627e114b3be2e66ed8d88b90037498333384d9bea822423662a44c3a8520e187')
+
+ variant('python', default=True, description="Build Python bindings")
+
+ depends_on("py-cython", type="build", when="+python")
+
+ def configure_args(self):
+ args = []
+ if "+python" in self.spec:
+ args.append("--enable-python")
+ return args
diff --git a/var/spack/repos/builtin/packages/nix/fix-doc-build.patch b/var/spack/repos/builtin/packages/nix/fix-doc-build.patch
new file mode 100644
index 0000000000..ca10211d97
--- /dev/null
+++ b/var/spack/repos/builtin/packages/nix/fix-doc-build.patch
@@ -0,0 +1,31 @@
+diff -ru nix-2.0.4-orig/doc/manual/local.mk nix-2.0.4/doc/manual/local.mk
+--- nix-2.0.4-orig/doc/manual/local.mk 2018-07-20 11:12:18.121540267 +0200
++++ nix-2.0.4/doc/manual/local.mk 2018-07-20 11:43:58.514090409 +0200
+@@ -1,7 +1,7 @@
+
+ ifeq ($(doc_generate),yes)
+
+-XSLTPROC = $(xsltproc) --nonet $(xmlflags) \
++XSLTPROC = $(xsltproc) $(xmlflags) \
+ --param section.autolabel 1 \
+ --param section.label.includes.component.label 1 \
+ --param html.stylesheet \'style.css\' \
+@@ -21,7 +21,7 @@
+
+ # Do XInclude processing / RelaxNG validation
+ $(d)/manual.xmli: $(d)/manual.xml $(MANUAL_SRCS) $(d)/version.txt
+- $(trace-gen) $(xmllint) --nonet --xinclude $< -o $@.tmp
++ $(trace-gen) $(xmllint) --xinclude $< -o $@.tmp
+ @mv $@.tmp $@
+
+ $(d)/version.txt:
+@@ -29,9 +29,6 @@
+
+ # Note: RelaxNG validation requires xmllint >= 2.7.4.
+ $(d)/manual.is-valid: $(d)/manual.xmli
+- $(trace-gen) $(XSLTPROC) --novalid --stringparam profile.condition manual \
+- $(docbookxsl)/profiling/profile.xsl $< 2> /dev/null | \
+- $(xmllint) --nonet --noout --relaxng $(docbookrng) -
+ @touch $@
+
+ clean-files += $(d)/manual.xmli $(d)/version.txt $(d)/manual.is-valid
diff --git a/var/spack/repos/builtin/packages/nix/package.py b/var/spack/repos/builtin/packages/nix/package.py
new file mode 100644
index 0000000000..944a2e4770
--- /dev/null
+++ b/var/spack/repos/builtin/packages/nix/package.py
@@ -0,0 +1,59 @@
+# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack import *
+
+
+class Nix(AutotoolsPackage):
+ """Nix, the purely functional package manager"""
+
+ homepage = "http://nixos.org/nix"
+ url = "https://github.com/NixOS/nix/archive/2.0.4.zip"
+
+ version('2.2.1', sha256='b591664dd1b04a8f197407d445799ece41140a3117bcbdf8e3c5e94cd3f59854')
+ version('2.1.3', sha256='80d0834f3e34b3e91bd20969733d8010b3e253517ea64bf12258c5f450f86425')
+ version('2.0.4', sha256='49c78122b20e3ad894f546dd2a2f01c32ec528de790314820b1f1335276e3c22')
+
+ patch('fix-doc-build.patch')
+
+ variant('storedir', values=str, default="none",
+ description='path of the Nix store (defaults to /nix)')
+ variant('statedir', values=str, default="none",
+ description='path to the locale state (defaults to /nix/var)')
+ variant('doc', default=True,
+ description="Build and install documentation")
+ variant('sandboxing', default=True,
+ description='Enable build isolation')
+
+ depends_on('autoconf', type='build')
+ depends_on('automake', type='build')
+ depends_on('bison', type='build')
+ depends_on('flex', type='build')
+ depends_on('libtool', type='build')
+ depends_on('libxslt', when="+doc", type='build')
+ depends_on('m4', type='build')
+
+ depends_on('bzip2')
+ depends_on('curl')
+ depends_on('libseccomp', when="+sandboxing")
+ depends_on('sqlite')
+ depends_on('xz')
+
+ # gcc 4.9+ and higher supported with c++14
+ conflicts("%gcc@:4.8.99")
+
+ def configure_args(self):
+ args = []
+ if '+sandboxing' not in self.spec:
+ args.append('--disable-seccomp-sandboxing')
+ if '+doc' not in self.spec:
+ args.append('--disable-doc-gen')
+ storedir = self.spec.variants['storedir'].value
+ if storedir != "none":
+ args.append('--with-store-dir=' + storedir)
+ statedir = self.spec.variants['statedir'].value
+ if statedir != "none":
+ args.append('--localstatedir=' + statedir)
+ return args