2021-09-23 15:35:13 +00:00
|
|
|
{ lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config, openssl, curl
|
|
|
|
, Security
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "nix-index";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "unstable-2022-03-07";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bennofs";
|
|
|
|
repo = "nix-index";
|
2022-03-30 09:31:56 +00:00
|
|
|
rev = "f09548f66790d2d7d53f07ad2af62993d7cabb08";
|
|
|
|
sha256 = "sha256-xIJCzEHQJ2kHRbT4Ejrb5R5e/VqjKrklV7XneZIiyUg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
cargoSha256 = "sha256-2Yhnacsx8EWsfZfcfKhV687cblyFDmsfdqGZoK6Lulo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-23 15:35:13 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ openssl curl ]
|
2021-01-15 22:18:51 +00:00
|
|
|
++ lib.optional stdenv.isDarwin Security;
|
2020-04-24 23:36:52 +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-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A files database for nixpkgs";
|
|
|
|
homepage = "https://github.com/bennofs/nix-index";
|
|
|
|
license = with licenses; [ bsd3 ];
|
2021-09-23 15:35:13 +00:00
|
|
|
maintainers = with maintainers; [ bennofs ncfavier ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|