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";
|
2024-05-29 03:13:50 +00:00
|
|
|
version = "0.1.8";
|
2017-07-23 21:09:54 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-08-24 17:49:38 +00:00
|
|
|
owner = "nix-community";
|
2017-07-23 21:09:54 +00:00
|
|
|
repo = "nix-index";
|
2023-01-10 15:08:12 +00:00
|
|
|
rev = "v${version}";
|
2024-05-29 03:13:50 +00:00
|
|
|
hash = "sha256-r3Vg9ox953HdUp5Csxd2DYUyBe9u61fmA94PpcAZRqo=";
|
2017-07-23 21:09:54 +00:00
|
|
|
};
|
2020-02-14 02:00:26 +00:00
|
|
|
|
2024-05-29 03:13:50 +00:00
|
|
|
cargoHash = "sha256-c1Ivsj9of/cjEKU0lo4I9BfIUQZ3pPf2QF9fAlZTQn0=";
|
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 = ''
|
2023-08-24 17:49:38 +00:00
|
|
|
substituteInPlace command-not-found.sh \
|
|
|
|
--subst-var out
|
|
|
|
install -Dm555 command-not-found.sh -t $out/etc/profile.d
|
2017-07-23 21:09:54 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-07-23 21:09:54 +00:00
|
|
|
description = "Files database for nixpkgs";
|
2023-08-24 17:49:38 +00:00
|
|
|
homepage = "https://github.com/nix-community/nix-index";
|
|
|
|
changelog = "https://github.com/nix-community/nix-index/blob/${src.rev}/CHANGELOG.md";
|
2017-07-23 21:09:54 +00:00
|
|
|
license = with licenses; [ bsd3 ];
|
2023-08-24 17:49:38 +00:00
|
|
|
maintainers = with maintainers; [ bennofs figsoda ncfavier ];
|
2017-07-23 21:09:54 +00:00
|
|
|
};
|
|
|
|
}
|