]> git.scottworley.com Git - pinch/commitdiff
Use nix executables in $PATH
authorScott Worley <scottworley@scottworley.com>
Wed, 9 Jul 2025 23:34:55 +0000 (16:34 -0700)
committerScott Worley <scottworley@scottworley.com>
Thu, 10 Jul 2025 00:09:01 +0000 (17:09 -0700)
We started pinning the nix version back Jun 2021 over
<nix/unpack-channel.nix> 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 <nixpkgs>
  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.  :)

Changelog
default.nix

index 3599b9e78002e08b8d0f95504278f5e55b1ea177..e905bd1b70cb80a2289bafea150e95d63f61e64c 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,4 +1,5 @@
 ## [Unreleased]
+- Use nix executables in $PATH
 
 
 ## [3.2.0] - 2025-07-09
index 777a767f015346893531691b0bd5dece4b28a736..137402286f4979829d6fdfff38872a8eaa1e9ba7 100644 (file)
@@ -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 = {