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