mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-19 17:39:34 +00:00
python.pkgs.supervise_api: use patch to specify path to supervise
This commit is contained in:
parent
a5c3c8e409
commit
b36dc66bfe
|
@ -1,6 +1,7 @@
|
||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
|
, substituteAll
|
||||||
, supervise
|
, supervise
|
||||||
, isPy3k
|
, isPy3k
|
||||||
, whichcraft
|
, whichcraft
|
||||||
|
@ -16,11 +17,18 @@ buildPythonPackage rec {
|
||||||
sha256 = "1230f42294910e83421b7d3b08a968d27d510a4a709e966507ed70db5da1b9de";
|
sha256 = "1230f42294910e83421b7d3b08a968d27d510a4a709e966507ed70db5da1b9de";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
patches = [
|
||||||
supervise
|
(substituteAll {
|
||||||
] ++ lib.optionals ( !isPy3k ) [
|
src = ./supervise-path.patch;
|
||||||
whichcraft
|
inherit supervise;
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# In the git repo, supervise_api lives inside a python subdir
|
||||||
|
patchFlags = [ "-p2" ];
|
||||||
|
|
||||||
|
propagatedBuildInputs = lib.optional (!isPy3k) whichcraft;
|
||||||
|
|
||||||
checkInputs = [ utillinux ];
|
checkInputs = [ utillinux ];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
diff --git a/python/supervise_api/supervise.py b/python/supervise_api/supervise.py
|
||||||
|
index 497d3ea..be57e35 100644
|
||||||
|
--- a/python/supervise_api/supervise.py
|
||||||
|
+++ b/python/supervise_api/supervise.py
|
||||||
|
@@ -41,9 +41,7 @@ try:
|
||||||
|
except:
|
||||||
|
from whichcraft import which
|
||||||
|
|
||||||
|
-supervise_utility_location = which("supervise")
|
||||||
|
-if not supervise_utility_location:
|
||||||
|
- raise FileNotFoundError(errno.ENOENT, "Executable not found in PATH", "supervise")
|
||||||
|
+supervise_utility_location = '@supervise@/bin/supervise'
|
||||||
|
|
||||||
|
|
||||||
|
def ignore_sigchld():
|
Loading…
Reference in a new issue