From f2f22eb254be27577cde2c2ab7e6cda80c1229a5 Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Mon, 7 Jun 2021 12:13:43 -0700 Subject: [PATCH] Use nix from nixpkgs (not from PATH) to avoid nixUnstable --- Changelog | 4 ++++ default.nix | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) 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"; }) { -- 2.44.1