nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 bash,
4 buildPythonPackage,
5 fetchFromGitHub,
6 jupyterhub,
7 setuptools,
8 tornado,
9}:
10
11buildPythonPackage rec {
12 pname = "jupyterhub-systemdspawner";
13 version = "1.0.2";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "jupyterhub";
18 repo = "systemdspawner";
19 tag = "v${version}";
20 hash = "sha256-obM8HGCHsisRV1+kHMWdA7d6eb6awwPMBuDUAf3k0uI=";
21 };
22
23 postPatch = ''
24 substituteInPlace systemdspawner/systemdspawner.py \
25 --replace-fail "/bin/bash" "${bash}/bin/bash"
26 '';
27
28 build-system = [ setuptools ];
29
30 dependencies = [
31 jupyterhub
32 tornado
33 ];
34
35 # Module has no tests
36 doCheck = false;
37
38 postInstall = ''
39 mkdir -p $out/bin
40 cp check-kernel.bash $out/bin/
41 patchShebangs $out/bin
42 '';
43
44 pythonImportsCheck = [ "systemdspawner" ];
45
46 meta = {
47 description = "JupyterHub Spawner using systemd for resource isolation";
48 mainProgram = "check-kernel.bash";
49 homepage = "https://github.com/jupyterhub/systemdspawner";
50 changelog = "https://github.com/jupyterhub/systemdspawner/blob/v${version}/CHANGELOG.md";
51 license = lib.licenses.bsd3;
52 maintainers = [ ];
53 };
54}