This repository has been archived by the owner on Feb 26, 2025. It is now read-only.
forked from spack/spack
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from BlueBrain/pkg/nix
Add recipe for Nix
- Loading branch information
Showing
3 changed files
with
141 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
############################################################################## | ||
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. | ||
# Produced at the Lawrence Livermore National Laboratory. | ||
# | ||
# This file is part of Spack. | ||
# Created by Todd Gamblin, [email protected], All rights reserved. | ||
# LLNL-CODE-647188 | ||
# | ||
# For details, see https://github.com/spack/spack | ||
# Please also see the NOTICE and LICENSE files for our notice and the LGPL. | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU Lesser General Public License (as | ||
# published by the Free Software Foundation) version 2.1, February 1999. | ||
# | ||
# This program is distributed in the hope that it will be useful, but | ||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and | ||
# conditions of the GNU Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public | ||
# License along with this program; if not, write to the Free Software | ||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
############################################################################## | ||
from spack import * | ||
|
||
|
||
class Libseccomp(AutotoolsPackage): | ||
"""Interface to the Linux Kernel's syscall filtering mechanism""" | ||
|
||
homepage = "https://github.com/seccomp/libseccomp" | ||
url = "https://github.com/seccomp/libseccomp/releases/download/v2.3.3/libseccomp-2.3.3.tar.gz" | ||
|
||
version('2.3.3', 'e6b4e463857fe05c09dc56ec3bcaef84') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 [email protected] | ||
+ $(trace-gen) $(xmllint) --xinclude $< -o [email protected] | ||
@mv [email protected] $@ | ||
|
||
$(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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
############################################################################## | ||
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. | ||
# Produced at the Lawrence Livermore National Laboratory. | ||
# | ||
# This file is part of Spack. | ||
# Created by Todd Gamblin, [email protected], All rights reserved. | ||
# LLNL-CODE-647188 | ||
# | ||
# For details, see https://github.com/spack/spack | ||
# Please also see the NOTICE and LICENSE files for our notice and the LGPL. | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU Lesser General Public License (as | ||
# published by the Free Software Foundation) version 2.1, February 1999. | ||
# | ||
# This program is distributed in the hope that it will be useful, but | ||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and | ||
# conditions of the GNU Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public | ||
# License along with this program; if not, write to the Free Software | ||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
############################################################################## | ||
import os.path as osp | ||
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.0.4', '045adeb4714f559386e391cc3c411710') | ||
|
||
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', values=bool, default=True, | ||
description="Build and install documentation") | ||
variant('sandboxing', values=bool, 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('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: | ||
args.append('--with-store-dir=' + storedir) | ||
statedir = self.spec.variants['statedir'].value | ||
if statedir: | ||
args.append('--localstatedir=' + statedir) | ||
return args |