nixpkgs/pkgs/tools/package-management/nix-index/default.nix
Alyssa Ross 062210bdff treewide: update cargoSha256 hashes for cargo-vendor upgrade
A recent upgrade of cargo-vendor changed its output slightly, which
broke all cargoSha256 hashes in nixpkgs.
See https://github.com/NixOS/nixpkgs/issues/60668 for more information.

Since then, a few hashes have been fixed in master by hand, but there
were a lot still to do, so I did all of the ones left over with some
scripts I wrote.

The one hash I wasn’t able to update was habitat's, because it’s
currently broken and the build doesn’t get far enough to produce a
hash anyway.
2019-06-01 15:17:52 +00:00

39 lines
1.1 KiB
Nix

{ stdenv, rustPlatform, fetchFromGitHub, pkgconfig, makeWrapper, openssl, curl
, nix, Security
}:
rustPlatform.buildRustPackage rec {
name = "nix-index-${version}";
version = "0.1.2";
src = fetchFromGitHub {
owner = "bennofs";
repo = "nix-index";
rev = "v${version}";
sha256 = "05fqfwz34n4ijw7ydw2n6bh4bv64rhks85cn720sy5r7bmhfmfa8";
};
cargoSha256 = "0h8a5bnv32rkvywn8xdbny38m24bi6p9scwljgdk8k067pn3qk34";
nativeBuildInputs = [ pkgconfig makeWrapper ];
buildInputs = [ openssl curl ]
++ stdenv.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 : "${stdenv.lib.makeBinPath [ nix ]}"
'';
meta = with stdenv.lib; {
description = "A files database for nixpkgs";
homepage = https://github.com/bennofs/nix-index;
license = with licenses; [ bsd3 ];
maintainers = [ maintainers.bennofs ];
platforms = platforms.all;
};
}