nix: new package added (#9171)

This commit is contained in:
Tristan Carel 2019-02-19 15:27:39 +01:00 committed by Massimiliano Culpo
parent 2242b9f338
commit efc3406900
3 changed files with 115 additions and 0 deletions

View file

@ -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

View file

@ -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

View file

@ -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