Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 bash, 4 buildPythonPackage, 5 fetchFromGitHub, 6 jupyterhub, 7 pythonOlder, 8 tornado, 9}: 10 11buildPythonPackage rec { 12 pname = "jupyterhub-systemdspawner"; 13 version = "1.0.1"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.8"; 17 18 src = fetchFromGitHub { 19 owner = "jupyterhub"; 20 repo = "systemdspawner"; 21 rev = "refs/tags/v${version}"; 22 hash = "sha256-2Pxswa472umovHBUVTIX1l+Glj6bzzgBLsu+p4IA6jA="; 23 }; 24 25 postPatch = '' 26 substituteInPlace systemdspawner/systemd.py \ 27 --replace "/bin/bash" "${bash}/bin/bash" 28 29 substituteInPlace systemdspawner/systemdspawner.py \ 30 --replace "/bin/bash" "${bash}/bin/bash" 31 ''; 32 33 buildInputs = [ bash ]; 34 35 propagatedBuildInputs = [ 36 jupyterhub 37 tornado 38 ]; 39 40 # Module has no tests 41 doCheck = false; 42 43 postInstall = '' 44 mkdir -p $out/bin 45 cp check-kernel.bash $out/bin/ 46 patchShebangs $out/bin 47 ''; 48 49 pythonImportsCheck = [ "systemdspawner" ]; 50 51 meta = with lib; { 52 description = "JupyterHub Spawner using systemd for resource isolation"; 53 mainProgram = "check-kernel.bash"; 54 homepage = "https://github.com/jupyterhub/systemdspawner"; 55 changelog = "https://github.com/jupyterhub/systemdspawner/blob/v${version}/CHANGELOG.md"; 56 license = licenses.bsd3; 57 maintainers = [ ]; 58 }; 59}