2016-11-14 01:26:59 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
2017-11-07 03:47:20 +00:00
|
|
|
, autoreconfHook
|
|
|
|
, gnutar
|
|
|
|
, which
|
|
|
|
, gnugrep
|
|
|
|
, coreutils
|
|
|
|
, python
|
|
|
|
, e2fsprogs
|
|
|
|
, makeWrapper
|
|
|
|
, squashfsTools
|
|
|
|
, gzip
|
|
|
|
, gnused
|
|
|
|
, curl
|
|
|
|
, utillinux
|
2018-05-08 09:40:10 +01:00
|
|
|
, libarchive
|
2018-05-09 01:19:38 +01:00
|
|
|
, file
|
2017-11-07 03:47:20 +00:00
|
|
|
}:
|
2016-11-14 01:26:59 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "singularity-${version}";
|
2018-07-08 00:41:51 +01:00
|
|
|
version = "2.5.2";
|
2017-11-07 03:47:20 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
patches = [ ./env.patch ];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
sed -i 's/-static//g' src/Makefile.am
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
2018-03-12 04:13:31 +00:00
|
|
|
configureFlags = "--localstatedir=/var";
|
|
|
|
installFlags = "CONTAINER_MOUNTDIR=dummy CONTAINER_FINALDIR=dummy CONTAINER_OVERLAY=dummy SESSIONDIR=dummy";
|
|
|
|
|
2017-11-07 03:47:20 +00:00
|
|
|
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
|
|
|
|
'';
|
2016-11-14 01:26:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "singularityware";
|
|
|
|
repo = "singularity";
|
|
|
|
rev = version;
|
2018-07-08 00:41:51 +01:00
|
|
|
sha256 = "09wv8xagr5fjfhra5vyig0f1frfp97g99baqkh4avbzpg296q933";
|
2016-11-14 01:26:59 +00:00
|
|
|
};
|
|
|
|
|
2017-11-07 03:47:20 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook makeWrapper ];
|
2018-05-09 01:19:38 +01:00
|
|
|
buildInputs = [ coreutils gnugrep python e2fsprogs which gnutar squashfsTools gzip gnused curl utillinux libarchive file ];
|
2016-11-14 01:26:59 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://singularity.lbl.gov/;
|
|
|
|
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";
|
|
|
|
license = "BSD license with 2 modifications";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.jbedo ];
|
|
|
|
};
|
|
|
|
}
|