1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-26 15:41:40 +00:00
nixpkgs/pkgs/tools/package-management/nix-index/default.nix
Benjamin Hipple 74aae635e5 nix-index: upgrade cargo fetcher and cargoSha256
Infra upgrade as part of #79975; no functional change expected.
2020-02-16 15:29:53 +01:00

41 lines
1.1 KiB
Nix

{ stdenv, rustPlatform, fetchFromGitHub, pkgconfig, 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 = "0apdr9z18p6m4lfjv8k9zv2mqc7vssd2d536zfv1pns0pdqsfw50";
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;
};
}