tetragon: 0.1.1 -> 1.2.0 (#356642)
[NixPkgs.git] / pkgs / tools / package-management / nix-index / default.nix
blob433ad82d4d2f823e939c370e65c6ddd8fae807ef
1 { lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config, openssl, curl, sqlite
2 , Security
3 }:
5 rustPlatform.buildRustPackage rec {
6   pname = "nix-index";
7   version = "0.1.8";
9   src = fetchFromGitHub {
10     owner = "nix-community";
11     repo = "nix-index";
12     rev = "v${version}";
13     hash = "sha256-r3Vg9ox953HdUp5Csxd2DYUyBe9u61fmA94PpcAZRqo=";
14   };
16   cargoHash = "sha256-c1Ivsj9of/cjEKU0lo4I9BfIUQZ3pPf2QF9fAlZTQn0=";
18   nativeBuildInputs = [ pkg-config ];
19   buildInputs = [ openssl curl sqlite ]
20     ++ lib.optional stdenv.hostPlatform.isDarwin Security;
22   postInstall = ''
23     substituteInPlace command-not-found.sh \
24       --subst-var out
25     install -Dm555 command-not-found.sh -t $out/etc/profile.d
26   '';
28   meta = with lib; {
29     description = "Files database for nixpkgs";
30     homepage = "https://github.com/nix-community/nix-index";
31     changelog = "https://github.com/nix-community/nix-index/blob/${src.rev}/CHANGELOG.md";
32     license = with licenses; [ bsd3 ];
33     maintainers = with maintainers; [ bennofs figsoda ncfavier ];
34   };