aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/python-modules/jupyterhub-systemdspawner/default.nix
blob: dc38acc66f7ca5c1ac63b3f2e5f65b738ae8ad2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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 ];
  };
}