at 18.03-beta 58 lines 1.5 kB view raw
1{ stdenv 2, fetchFromGitHub 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 }: 17 18stdenv.mkDerivation rec { 19 name = "singularity-${version}"; 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 ''; 40 41 src = fetchFromGitHub { 42 owner = "singularityware"; 43 repo = "singularity"; 44 rev = version; 45 sha256 = "1hi1ag1lb2x4djbz4x34wix83ymx0g9mzn2md6yrpiflc1d85rjz"; 46 }; 47 48 nativeBuildInputs = [ autoreconfHook makeWrapper ]; 49 buildInputs = [ coreutils gnugrep python e2fsprogs which gnutar squashfsTools gzip gnused curl utillinux ]; 50 51 meta = with stdenv.lib; { 52 homepage = http://singularity.lbl.gov/; 53 description = "Designed around the notion of extreme mobility of compute and reproducible science, Singularity enables users to have full control of their operating system environment"; 54 license = "BSD license with 2 modifications"; 55 platforms = platforms.linux; 56 maintainers = [ maintainers.jbedo ]; 57 }; 58}