From: Scott Worley Date: Mon, 7 Jun 2021 19:13:43 +0000 (-0700) Subject: Use nix from nixpkgs (not from PATH) to avoid nixUnstable X-Git-Tag: v3.0.4~1 X-Git-Url: http://git.scottworley.com/pinch/commitdiff_plain/f2f22eb254be27577cde2c2ab7e6cda80c1229a5?ds=inline Use nix from nixpkgs (not from PATH) to avoid nixUnstable --- diff --git a/Changelog b/Changelog index ed58b28..7946d7b 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,8 @@ ## [Unreleased] +### Changed +- Use nix from nixpkgs rather than from PATH. This is needed when the nix in +PATH is nixUnstable-3.0pre20201020_e0ca98c or later because nix commit +787469c7b66aec12ab6847e7db2cdc8aef5c325e removed . ## [3.0.3] - 2021-05-20 diff --git a/default.nix b/default.nix index 913f546..8c8fbd3 100644 --- a/default.nix +++ b/default.nix @@ -34,14 +34,18 @@ let checkPhase = "./test.sh"; }; -in pkgs.python3Packages.callPackage -({ lib, buildPythonPackage, nix, git, autopep8, mypy, pylint, git-cache, }: +in pkgs.python3Packages.callPackage ({ lib, buildPythonPackage, nix, git + , autopep8, makeWrapper, mypy, pylint, git-cache, }: buildPythonPackage rec { pname = "pinch"; version = "3.0.4-pre"; src = lib.cleanSource ./.; + buildInputs = [ makeWrapper ]; propagatedBuildInputs = [ git-cache ]; checkInputs = [ nix git mypy ] ++ lib.optionals lint [ autopep8 pylint ]; + postInstall = '' + wrapProgram "$out/bin/pinch" --prefix PATH : ${nix}/bin + ''; doCheck = true; checkPhase = "./test.sh"; }) {