nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

python.pkgs.supervise_api: use patch to specify path to supervise

(cherry picked from commit b36dc66bfea6b0a733cf13bed85d80462d39c736)

+27 -4
+12 -4
pkgs/development/python-modules/supervise_api/default.nix
··· 1 1 { lib 2 2 , buildPythonPackage 3 3 , fetchPypi 4 + , substituteAll 4 5 , supervise 5 6 , isPy3k 6 7 , whichcraft ··· 17 16 sha256 = "1230f42294910e83421b7d3b08a968d27d510a4a709e966507ed70db5da1b9de"; 18 17 }; 19 18 20 - propagatedBuildInputs = [ 21 - supervise 22 - ] ++ lib.optionals ( !isPy3k ) [ 23 - whichcraft 19 + patches = [ 20 + (substituteAll { 21 + src = ./supervise-path.patch; 22 + inherit supervise; 23 + }) 24 24 ]; 25 + 26 + # In the git repo, supervise_api lives inside a python subdir 27 + patchFlags = [ "-p2" ]; 28 + 29 + propagatedBuildInputs = lib.optional (!isPy3k) whichcraft; 30 + 25 31 checkInputs = [ utillinux ]; 26 32 27 33 meta = {
+15
pkgs/development/python-modules/supervise_api/supervise-path.patch
··· 1 + diff --git a/python/supervise_api/supervise.py b/python/supervise_api/supervise.py 2 + index 497d3ea..be57e35 100644 3 + --- a/python/supervise_api/supervise.py 4 + +++ b/python/supervise_api/supervise.py 5 + @@ -41,9 +41,7 @@ try: 6 + except: 7 + from whichcraft import which 8 + 9 + -supervise_utility_location = which("supervise") 10 + -if not supervise_utility_location: 11 + - raise FileNotFoundError(errno.ENOENT, "Executable not found in PATH", "supervise") 12 + +supervise_utility_location = '@supervise@/bin/supervise' 13 + 14 + 15 + def ignore_sigchld():