Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 19532f2ba243
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e9ecd7f87256
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Dec 4, 2018

  1. nix-index: Wrap with nix-env in PATH (#51165)

    This fixes an impurity in nix-index: Previously it would take the nix-env
    binary from the users PATH. I discovered this while trying to run nix-index in a
    systemd service, which by default doesn't have nix-env in its path. The
    errors it threw were not informative at all and it took me hours to
    finally figure out the reason.
    infinisil authored and bennofs committed Dec 4, 2018
    Copy the full SHA
    e9ecd7f View commit details
Showing with 5 additions and 3 deletions.
  1. +5 −3 pkgs/tools/package-management/nix-index/default.nix
8 changes: 5 additions & 3 deletions pkgs/tools/package-management/nix-index/default.nix
Original file line number Diff line number Diff line change
@@ -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; {