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