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";
|
2022-01-02 17:51:56 +01:00
|
|
|
version = "unstable-2022-03-07";
|
2017-07-23 23:09:54 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bennofs";
|
|
|
|
repo = "nix-index";
|
2022-01-02 17:51:56 +01:00
|
|
|
rev = "f09548f66790d2d7d53f07ad2af62993d7cabb08";
|
|
|
|
sha256 = "sha256-xIJCzEHQJ2kHRbT4Ejrb5R5e/VqjKrklV7XneZIiyUg=";
|
2017-07-23 23:09:54 +02:00
|
|
|
};
|
2020-02-14 03:00:26 +01:00
|
|
|
|
2022-01-02 17:51:56 +01:00
|
|
|
cargoSha256 = "sha256-2Yhnacsx8EWsfZfcfKhV687cblyFDmsfdqGZoK6Lulo=";
|
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
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|