2021-09-14 19:33:08 +02:00
|
|
|
{ lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config, openssl, curl
|
|
|
|
, Security
|
2018-10-12 19:04:19 +02:00
|
|
|
}:
|
2017-07-23 23:09:54 +02:00
|
|
|
|
2018-10-12 19:04:19 +02:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-08-31 13:41:23 +02:00
|
|
|
pname = "nix-index";
|
2018-10-11 21:42:28 +02:00
|
|
|
version = "0.1.2";
|
2017-07-23 23:09:54 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bennofs";
|
|
|
|
repo = "nix-index";
|
|
|
|
rev = "v${version}";
|
2018-10-11 21:42:28 +02:00
|
|
|
sha256 = "05fqfwz34n4ijw7ydw2n6bh4bv64rhks85cn720sy5r7bmhfmfa8";
|
2017-07-23 23:09:54 +02:00
|
|
|
};
|
2020-02-14 03:00:26 +01:00
|
|
|
|
2021-05-07 13:00:49 +02:00
|
|
|
cargoSha256 = "161lz96a52s53rhhkxxhcg41bsmh8w6rv6nl8gwqmg3biszy7hah";
|
2020-02-15 23:34:00 +01:00
|
|
|
|
2021-09-14 19:33:08 +02:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2018-10-12 19:04:19 +02:00
|
|
|
buildInputs = [ openssl curl ]
|
2021-01-15 10:19:50 +01:00
|
|
|
++ lib.optional stdenv.isDarwin Security;
|
2017-07-23 23:09:54 +02:00
|
|
|
|
2018-11-03 21:54:02 +01:00
|
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
|
2017-07-23 23:09:54 +02: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"
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2017-07-23 23:09:54 +02:00
|
|
|
description = "A files database for nixpkgs";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/bennofs/nix-index";
|
2017-07-23 23:09:54 +02:00
|
|
|
license = with licenses; [ bsd3 ];
|
2021-09-14 19:33:08 +02:00
|
|
|
maintainers = with maintainers; [ bennofs ncfavier ];
|
2017-07-23 23:09:54 +02:00
|
|
|
};
|
|
|
|
}
|