2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, proot, patchelf, fakechroot, runc, simplejson, pycurl, coreutils, nose, mock, buildPythonApplication }:
|
2018-02-01 12:36:44 +00:00
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
|
2019-06-01 08:32:19 +01:00
|
|
|
version = "1.1.3";
|
2018-02-01 12:36:44 +00:00
|
|
|
pname = "udocker";
|
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
src = fetchFromGitHub {
|
2018-02-01 12:36:44 +00:00
|
|
|
owner = "indigo-dc";
|
|
|
|
repo = "udocker" ;
|
|
|
|
rev = "v${version}";
|
2019-06-01 08:32:19 +01:00
|
|
|
sha256 = "1c8y1p3brj987drikwrby8m1hdr40ja4anx0p4xsij3ll2h62w6z";
|
2018-02-01 12:36:44 +00:00
|
|
|
};
|
|
|
|
|
2019-03-07 21:55:12 +00:00
|
|
|
buildInputs = [ proot patchelf fakechroot runc simplejson pycurl coreutils ];
|
2018-02-01 12:36:44 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace udocker.py --replace /usr/sbin:/sbin:/usr/bin:/bin $PATH
|
|
|
|
substituteInPlace udocker.py --replace /bin/chmod ${coreutils}/bin/chmod
|
|
|
|
substituteInPlace udocker.py --replace /bin/rm ${coreutils}/bin/rm
|
|
|
|
substituteInPlace tests/unit_tests.py --replace /bin/rm ${coreutils}/bin/rm
|
|
|
|
substituteInPlace udocker.py --replace "autoinstall = True" "autoinstall = False"
|
|
|
|
'';
|
|
|
|
|
2019-03-07 21:55:12 +00:00
|
|
|
checkInputs = [
|
|
|
|
nose
|
|
|
|
mock
|
|
|
|
];
|
|
|
|
|
2018-02-01 12:36:44 +00:00
|
|
|
checkPhase = ''
|
|
|
|
NOSE_EXCLUDE=test_03_create_repo,test_04_is_repo,test_02__get_group_from_host nosetests -v tests/unit_tests.py
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-02-01 12:36:44 +00:00
|
|
|
description = "basic user tool to execute simple docker containers in user space without root privileges";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://indigo-dc.gitbooks.io/udocker";
|
2018-02-01 12:36:44 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.bzizou ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|