summary refs log tree commit diff
path: root/pkgs/development/python-modules/supervise-api/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/supervise-api/default.nix')
-rw-r--r--pkgs/development/python-modules/supervise-api/default.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/supervise-api/default.nix b/pkgs/development/python-modules/supervise-api/default.nix
new file mode 100644
index 00000000000..3bd223127a7
--- /dev/null
+++ b/pkgs/development/python-modules/supervise-api/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, substituteAll
+, supervise
+, setuptools
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "supervise-api";
+  version = "0.6.0";
+  pyproject = true;
+
+  src = fetchPypi {
+    pname = "supervise_api";
+    inherit version;
+    hash = "sha256-EjD0IpSRDoNCG307CKlo0n1RCkpwnpZlB+1w212hud4=";
+  };
+
+  postPatch = ''
+    substituteInPlace supervise_api/supervise.py \
+      --replace 'which("supervise")' '"${supervise}/bin/supervise"'
+  '';
+
+  nativeBuildInputs = [
+    setuptools
+  ];
+
+  nativeCheckInputs = [
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "supervise_api"
+  ];
+
+  meta = {
+    description = "An API for running processes safely and securely";
+    homepage = "https://github.com/catern/supervise";
+    license = lib.licenses.mit;
+    platforms = lib.platforms.linux;
+    maintainers = with lib.maintainers; [ catern ];
+  };
+}