forked from mirrors/nixpkgs
85f96822a0
Rust 1.50.0 incorporated a Cargo change (rust-lang/cargo#8937) in which cargo vendor erroneously changed permissions of vendored crates. This was fixed in Rust 1.51.0 (rust-lang/cargo#9131). Unfortunately, this means that all cargoSha256/cargoHashes produced during the Rust 1.50.0 cycle are potentially broken. This change updates cargoSha256/cargoHash tree-wide. Fixes #121994.
40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
{ lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config, makeWrapper, openssl, curl
|
|
, nix, Security
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "nix-index";
|
|
version = "0.1.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "bennofs";
|
|
repo = "nix-index";
|
|
rev = "v${version}";
|
|
sha256 = "05fqfwz34n4ijw7ydw2n6bh4bv64rhks85cn720sy5r7bmhfmfa8";
|
|
};
|
|
|
|
cargoSha256 = "161lz96a52s53rhhkxxhcg41bsmh8w6rv6nl8gwqmg3biszy7hah";
|
|
|
|
nativeBuildInputs = [ pkg-config makeWrapper ];
|
|
buildInputs = [ openssl curl ]
|
|
++ lib.optional stdenv.isDarwin Security;
|
|
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
postInstall = ''
|
|
mkdir -p $out/etc/profile.d
|
|
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 : "${lib.makeBinPath [ nix ]}"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A files database for nixpkgs";
|
|
homepage = "https://github.com/bennofs/nix-index";
|
|
license = with licenses; [ bsd3 ];
|
|
maintainers = [ maintainers.bennofs ];
|
|
};
|
|
}
|