2023-01-11 07:51:40 +00:00
|
|
|
{ lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config, openssl, curl, sqlite
|
2021-09-23 15:35:13 +00:00
|
|
|
, Security
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "nix-index";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "0.1.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-10-09 19:29:22 +00:00
|
|
|
owner = "nix-community";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "nix-index";
|
2023-01-11 07:51:40 +00:00
|
|
|
rev = "v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-r3Vg9ox953HdUp5Csxd2DYUyBe9u61fmA94PpcAZRqo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
cargoHash = "sha256-c1Ivsj9of/cjEKU0lo4I9BfIUQZ3pPf2QF9fAlZTQn0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-23 15:35:13 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2023-01-11 07:51:40 +00:00
|
|
|
buildInputs = [ openssl curl sqlite ]
|
2021-01-15 22:18:51 +00:00
|
|
|
++ lib.optional stdenv.isDarwin Security;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2023-10-09 19:29:22 +00:00
|
|
|
substituteInPlace command-not-found.sh \
|
|
|
|
--subst-var out
|
|
|
|
install -Dm555 command-not-found.sh -t $out/etc/profile.d
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Files database for nixpkgs";
|
2023-10-09 19:29:22 +00:00
|
|
|
homepage = "https://github.com/nix-community/nix-index";
|
|
|
|
changelog = "https://github.com/nix-community/nix-index/blob/${src.rev}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = with licenses; [ bsd3 ];
|
2023-10-09 19:29:22 +00:00
|
|
|
maintainers = with maintainers; [ bennofs figsoda ncfavier ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|