From b7e0ea3a4ab6d78980cce1d8929f56da9f707bc3 Mon Sep 17 00:00:00 2001 From: Artturin Date: Mon, 4 Nov 2024 02:37:57 +0200 Subject: [PATCH] flashfocus: Use path for pidof Add bash for the nc script shebang --- pkgs/misc/flashfocus/default.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/misc/flashfocus/default.nix b/pkgs/misc/flashfocus/default.nix index 8c7fb067f1ab..f49c7936f60e 100644 --- a/pkgs/misc/flashfocus/default.nix +++ b/pkgs/misc/flashfocus/default.nix @@ -1,4 +1,4 @@ -{ lib, python3Packages, fetchPypi, netcat-openbsd, nix-update-script }: +{ lib, python3Packages, fetchPypi, netcat-openbsd, procps, bash, nix-update-script }: python3Packages.buildPythonApplication rec { pname = "flashfocus"; @@ -13,13 +13,20 @@ python3Packages.buildPythonApplication rec { postPatch = '' substituteInPlace bin/nc_flash_window \ - --replace "nc" "${lib.getExe netcat-openbsd}" + --replace-fail "nc" "${lib.getExe netcat-openbsd}" + + substituteInPlace src/flashfocus/util.py \ + --replace-fail "pidof" "${lib.getExe' procps "pidof"}" ''; nativeBuildInputs = with python3Packages; [ setuptools ]; + buildInputs = [ + bash + ]; + pythonRelaxDeps = [ "pyyaml" "xcffib"