nixpkgs/pkgs/tools/package-management/nix-index/default.nix

35 lines
1,014 B
Nix
Raw Normal View History

2018-10-12 17:04:19 +00:00
{ stdenv, rustPlatform, fetchFromGitHub, pkgconfig, openssl, curl
, Security
}:
2017-07-23 21:09:54 +00:00
2018-10-12 17:04:19 +00:00
rustPlatform.buildRustPackage rec {
2017-07-23 21:09:54 +00:00
name = "nix-index-${version}";
2018-10-11 19:42:28 +00:00
version = "0.1.2";
2017-07-23 21:09:54 +00:00
src = fetchFromGitHub {
owner = "bennofs";
repo = "nix-index";
rev = "v${version}";
2018-10-11 19:42:28 +00:00
sha256 = "05fqfwz34n4ijw7ydw2n6bh4bv64rhks85cn720sy5r7bmhfmfa8";
2017-07-23 21:09:54 +00:00
};
2018-10-11 19:42:28 +00:00
cargoSha256 = "045qm7cyg3sdvf22i8b9cz8gsvggs5bn9xz8k1pvn5gxb7zj24cx";
nativeBuildInputs = [ pkgconfig ];
2018-10-12 17:04:19 +00:00
buildInputs = [ openssl curl ]
++ stdenv.lib.optional stdenv.isDarwin Security;
2017-07-23 21:09:54 +00:00
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"
'';
2018-10-12 17:04:19 +00:00
meta = with stdenv.lib; {
2017-07-23 21:09:54 +00:00
description = "A files database for nixpkgs";
homepage = https://github.com/bennofs/nix-index;
license = with licenses; [ bsd3 ];
maintainers = [ maintainers.bennofs ];
platforms = platforms.all;
};
}