Files
nixpkgs/pkgs/development/python-modules/jupyterhub-systemdspawner/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

58 lines
1.2 KiB
Nix

{
lib,
bash,
buildPythonPackage,
fetchFromGitHub,
jupyterhub,
pythonOlder,
setuptools,
tornado,
}:
buildPythonPackage rec {
pname = "jupyterhub-systemdspawner";
version = "1.0.2";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "jupyterhub";
repo = "systemdspawner";
tag = "v${version}";
hash = "sha256-obM8HGCHsisRV1+kHMWdA7d6eb6awwPMBuDUAf3k0uI=";
};
postPatch = ''
substituteInPlace systemdspawner/systemdspawner.py \
--replace-fail "/bin/bash" "${bash}/bin/bash"
'';
build-system = [ setuptools ];
dependencies = [
jupyterhub
tornado
];
# Module has no tests
doCheck = false;
postInstall = ''
mkdir -p $out/bin
cp check-kernel.bash $out/bin/
patchShebangs $out/bin
'';
pythonImportsCheck = [ "systemdspawner" ];
meta = {
description = "JupyterHub Spawner using systemd for resource isolation";
mainProgram = "check-kernel.bash";
homepage = "https://github.com/jupyterhub/systemdspawner";
changelog = "https://github.com/jupyterhub/systemdspawner/blob/v${version}/CHANGELOG.md";
license = lib.licenses.bsd3;
maintainers = [ ];
};
}