From: Scott Worley Date: Wed, 9 Jul 2025 23:34:55 +0000 (-0700) Subject: Use nix executables in $PATH X-Git-Tag: v3.3.0~1 X-Git-Url: http://git.scottworley.com/pinch/commitdiff_plain/fb819850734c2ca68640736444c4c86ba15ccd70?hp=42dbaf9df4f644bf053e4a37847803283860ec18 Use nix executables in $PATH We started pinning the nix version back Jun 2021 over becoming private. As a side effect of pinning (overriding) the nix version, we bundled nix with pinch so that it could find nix even if it wasn't in $PATH. We're now unwinding that: We no longer need a specific (ancient) version of nix, so we're going back to using whatever is laying around in $PATH. This *could* be a breaking change if you were depending upon pinch's ability to find nix on its own. It seems unlikely that there are actually any users depending on this, so I'm not bumping the major version, but I am rolling rolling this out in two steps in case anyone is affected & would find it useful to have an intermediate version of pinch to pin to while they help newest pinch find nix stuff: pinch 3.1.0 - Uses ancient nix_2_3 that now no longer builds pinch 3.2.0 - Uses whatever nix is in pinch 3.3.0 - Uses whatever nix is in $PATH In case pinch's bundling of its own nix was giving anyone grief because it *wasn't* using the one in $PATH: Sorry. It's fixed now. You can unwind your hacks around this. :) --- diff --git a/Changelog b/Changelog index 3599b9e..e905bd1 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ ## [Unreleased] +- Use nix executables in $PATH ## [3.2.0] - 2025-07-09 diff --git a/default.nix b/default.nix index 777a767..1374022 100644 --- a/default.nix +++ b/default.nix @@ -21,19 +21,15 @@ let checkPhase = "./test.sh"; }; -in pkgs.python3Packages.callPackage ({ lib, buildPythonPackage, nix, git - , autopep8, makeWrapper, mypy, pylint, git-cache, }: +in pkgs.python3Packages.callPackage +({ lib, buildPythonPackage, nix, git, autopep8, mypy, pylint, git-cache, }: buildPythonPackage rec { pname = "pinch"; version = "3.3.0-pre"; src = lib.cleanSource ./.; - buildInputs = [ makeWrapper ]; propagatedBuildInputs = [ git-cache ]; "${checkInputsName}" = [ nix git mypy ] ++ lib.optionals lint [ autopep8 pylint ]; - postInstall = '' - wrapProgram "$out/bin/pinch" --prefix PATH : ${nix}/bin - ''; doCheck = true; checkPhase = "./test.sh"; meta = {