pythonPackages.systemdspawner: init at 0.14

This commit is contained in:
Chris Ostrouchov 2020-08-06 07:52:39 -04:00 committed by Jon
parent 228f08035d
commit 2147589c7a
3 changed files with 43 additions and 2 deletions

View File

@ -67,8 +67,8 @@ in {
this is a python file.
'';
example = literalExample ''
c.SystemdSpawner.memory = "8G"
c.SystemdSpawner.cpus = "2"
c.SystemdSpawner.mem_limit = '8G'
c.SystemdSpawner.cpu_limit = 2.0
'';
};

View File

@ -0,0 +1,37 @@
{ lib
, buildPythonPackage
, fetchPypi
, jupyterhub
, tornado
, bash
}:
buildPythonPackage rec {
pname = "jupyterhub-systemdspawner";
version = "0.14";
src = fetchPypi {
inherit pname version;
sha256 = "080dd9cd9292266dad35d1efc7aa1af0ed6993d15eadc79bd959d1ee273d1923";
};
propagatedBuildInputs = [
jupyterhub
tornado
];
postPatch = ''
substituteInPlace systemdspawner/systemd.py \
--replace "/bin/bash" "${bash}/bin/bash"
substituteInPlace systemdspawner/systemdspawner.py \
--replace "/bin/bash" "${bash}/bin/bash"
'';
meta = with lib; {
description = "JupyterHub Spawner using systemd for resource isolation";
homepage = "https://github.com/jupyterhub/systemdspawner";
license = licenses.bsd3;
maintainers = [ maintainers.costrouc ];
};
}

View File

@ -4481,6 +4481,10 @@ in {
jupyterhub-ldapauthenticator = callPackage ../development/python-modules/jupyterhub-ldapauthenticator { };
jupyterhub-systemdspawner = callPackage ../development/python-modules/jupyterhub-systemdspawner {
inherit (pkgs) bash;
};
kaggle = callPackage ../development/python-modules/kaggle { };
keyring = if isPy3k then