diff options
author | Justin Bedo <cu@cua0.org> | 2017-11-07 14:47:20 +1100 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2017-12-21 10:50:06 +1100 |
commit | db927ea35b655129a0a6590d60ba8c53730c22c7 (patch) | |
tree | 97a81e765a45c0d01612f8111e3dba368a54e774 /pkgs/applications/virtualization/singularity | |
parent | 02d361cea9d20fe4746092a9ced207b1d0dcd9e9 (diff) |
singularity: 2.2 -> 2.4
Diffstat (limited to 'pkgs/applications/virtualization/singularity')
-rw-r--r-- | pkgs/applications/virtualization/singularity/default.nix | 42 | ||||
-rw-r--r-- | pkgs/applications/virtualization/singularity/env.patch | 21 |
2 files changed, 58 insertions, 5 deletions
diff --git a/pkgs/applications/virtualization/singularity/default.nix b/pkgs/applications/virtualization/singularity/default.nix index ddd8cf72b93d..236cb8f31e66 100644 --- a/pkgs/applications/virtualization/singularity/default.nix +++ b/pkgs/applications/virtualization/singularity/default.nix @@ -1,20 +1,52 @@ { stdenv , fetchFromGitHub -, autoreconfHook }: +, autoreconfHook +, gnutar +, which +, gnugrep +, coreutils +, python +, e2fsprogs +, makeWrapper +, squashfsTools +, gzip +, gnused +, curl +, utillinux + }: stdenv.mkDerivation rec { name = "singularity-${version}"; - version = "2.2"; + version = "2.4"; + + enableParallelBuilding = true; + + patches = [ ./env.patch ]; + + preConfigure = '' + sed -i 's/-static//g' src/Makefile.am + patchShebangs . + ''; + + fixupPhase = '' + patchShebangs $out + for f in $out/libexec/singularity/helpers/help.sh $out/libexec/singularity/cli/*.exec $out/libexec/singularity/bootstrap-scripts/*.sh ; do + chmod a+x $f + sed -i 's| /sbin/| |g' $f + sed -i 's| /bin/bash| ${stdenv.shell}|g' $f + wrapProgram $f --prefix PATH : ${stdenv.lib.makeBinPath buildInputs} + done + ''; src = fetchFromGitHub { owner = "singularityware"; repo = "singularity"; rev = version; - sha256 = "19g43gfdy5s8y4252474cp39d6ypn5dd37wp0s21fgd13vqy26px"; + sha256 = "1hi1ag1lb2x4djbz4x34wix83ymx0g9mzn2md6yrpiflc1d85rjz"; }; - nativeBuildInputs = [ autoreconfHook ]; - buildInputs = [ ]; + nativeBuildInputs = [ autoreconfHook makeWrapper ]; + buildInputs = [ coreutils gnugrep python e2fsprogs which gnutar squashfsTools gzip gnused curl utillinux ]; meta = with stdenv.lib; { homepage = http://singularity.lbl.gov/; diff --git a/pkgs/applications/virtualization/singularity/env.patch b/pkgs/applications/virtualization/singularity/env.patch new file mode 100644 index 000000000000..bc3be363bb81 --- /dev/null +++ b/pkgs/applications/virtualization/singularity/env.patch @@ -0,0 +1,21 @@ +diff --git a/libexec/functions b/libexec/functions +index bc68107..6c2211c 100644 +--- a/libexec/functions ++++ b/libexec/functions +@@ -29,16 +29,6 @@ if [ -z "${SINGULARITY_MESSAGELEVEL:-}" ]; then + SINGULARITY_MESSAGELEVEL=5 + fi + +-if [ -z "${USER:-}" ]; then +- USER=`id -un` +- export USER +-fi +-if [ -z "${HOME:-}" ]; then +- HOME=`getent passwd "$USER" | cut -d : -f 6` +- export HOME +-fi +- +- + message() { + LEVEL="${1:-}" + MESSAGE="${2:-}" |