diff --git a/pkgs/tools/package-management/nix-index/default.nix b/pkgs/tools/package-management/nix-index/default.nix index c20e3142104a..a7cebe8d1c83 100644 --- a/pkgs/tools/package-management/nix-index/default.nix +++ b/pkgs/tools/package-management/nix-index/default.nix @@ -1,5 +1,5 @@ -{ stdenv, rustPlatform, fetchFromGitHub, pkgconfig, openssl, curl -, Security +{ stdenv, rustPlatform, fetchFromGitHub, pkgconfig, makeWrapper, openssl, curl +, nix, Security }: rustPlatform.buildRustPackage rec { @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec { sha256 = "05fqfwz34n4ijw7ydw2n6bh4bv64rhks85cn720sy5r7bmhfmfa8"; }; cargoSha256 = "045qm7cyg3sdvf22i8b9cz8gsvggs5bn9xz8k1pvn5gxb7zj24cx"; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig makeWrapper ]; buildInputs = [ openssl curl ] ++ stdenv.lib.optional stdenv.isDarwin Security; @@ -24,6 +24,8 @@ rustPlatform.buildRustPackage rec { cp ./command-not-found.sh $out/etc/profile.d/command-not-found.sh substituteInPlace $out/etc/profile.d/command-not-found.sh \ --replace "@out@" "$out" + wrapProgram $out/bin/nix-index \ + --prefix PATH : "${stdenv.lib.makeBinPath [ nix ]}" ''; meta = with stdenv.lib; {