From e67750b4772497c391ab36e0808cd370b3f861be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Fri, 29 Jan 2021 08:32:31 +0100 Subject: [PATCH] feat: use drvSrc argument --- .gitignore | 2 +- package.nix | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index e7af4371..c7bc895f 100644 --- a/.gitignore +++ b/.gitignore @@ -20,5 +20,5 @@ result* buildconfig.rs installer.log -# this is a library not an app, so it should work accross most versions +# this ensures the version we are using is a random one, so we can ensure it works as it should anywhere flake.lock diff --git a/package.nix b/package.nix index 69c7ace1..25c55f88 100644 --- a/package.nix +++ b/package.nix @@ -18,10 +18,10 @@ , makeWrapper , nixpkgs , conf-tool -, shellHookAppend ? "" # only used by shell.nix to add channels to NIX_PATH , nixDistinst ? nixFlakes , makeRustPlatform , system +, drvSrc ? ./. }: let @@ -78,7 +78,7 @@ with rust; (makeRustPlatform packages.stable).buildRustPackage rec { pname = "distinst"; version = "0.0.1"; - src = ./.; + src = drvSrc; cargoSha256 = "sha256-0JZrFJ/b+HHZyyVjppX1dcjiN4YSz6FakfONZxSAeT8="; @@ -141,7 +141,6 @@ with rust; (makeRustPlatform packages.stable).buildRustPackage rec { shellHook = '' ${preBuild} export PATH="${lib.makeBinPath tools}:$PATH" - ${shellHookAppend} ''; doCheck = false;