@@ -1,20 +1,52 @@
11{ stdenv
22, fetchFromGitHub
3−, autoreconfHook }:
3+, autoreconfHook
4+, gnutar
5+, which
6+, gnugrep
7+, coreutils
8+, python
9+, e2fsprogs
10+, makeWrapper
11+, squashfsTools
12+, gzip
13+, gnused
14+, curl
15+, utillinux
16+ }:
417
518stdenv.mkDerivation rec {
619 name = "singularity-${version}";
7− version = "2.2";
20+ version = "2.4";
21+
22+ enableParallelBuilding = true;
23+
24+ patches = [ ./env.patch ];
25+
26+ preConfigure = ''
27+ sed -i 's/-static//g' src/Makefile.am
28+ patchShebangs .
29+ '';
30+
31+ fixupPhase = ''
32+ patchShebangs $out
33+ for f in $out/libexec/singularity/helpers/help.sh $out/libexec/singularity/cli/*.exec $out/libexec/singularity/bootstrap-scripts/*.sh ; do
34+ chmod a+x $f
35+ sed -i 's| /sbin/| |g' $f
36+ sed -i 's| /bin/bash| ${stdenv.shell}|g' $f
37+ wrapProgram $f --prefix PATH : ${stdenv.lib.makeBinPath buildInputs}
38+ done
39+ '';
840
941 src = fetchFromGitHub {
1042 owner = "singularityware";
1143 repo = "singularity";
1244 rev = version;
13− sha256 = "19g43gfdy5s8y4252474cp39d6ypn5dd37wp0s21fgd13vqy26px";
45+ sha256 = "1hi1ag1lb2x4djbz4x34wix83ymx0g9mzn2md6yrpiflc1d85rjz";
1446 };
1547
16− nativeBuildInputs = [ autoreconfHook ];
17− buildInputs = [ ];
48+ nativeBuildInputs = [ autoreconfHook makeWrapper ];
49+ buildInputs = [ coreutils gnugrep python e2fsprogs which gnutar squashfsTools gzip gnused curl utillinux ];
1850
1951 meta = with stdenv.lib; {
2052 homepage = http://singularity.lbl.gov/;