nixpkgs/pkgs/tools/package-management/nix-index/default.nix

36 lines
998 B
Nix
Raw Normal View History

{ lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config, openssl, curl, sqlite
, 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";
2023-02-13 19:16:50 +00:00
version = "0.1.5";
2017-07-23 21:09:54 +00:00
src = fetchFromGitHub {
owner = "bennofs";
repo = "nix-index";
rev = "v${version}";
2023-02-13 19:16:50 +00:00
sha256 = "sha256-/btQP7I4zpIA0MWEQJVYnR1XhyudPnYD5Qx4vrW+Uq8=";
2017-07-23 21:09:54 +00:00
};
2023-02-13 19:16:50 +00:00
cargoSha256 = "sha256-CzLBOLtzIYqdWjTDKHVnc1YXXyj1HqvXzoFYHS0qxog=";
nativeBuildInputs = [ pkg-config ];
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 = ''
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"
'';
meta = with lib; {
2017-07-23 21:09:54 +00:00
description = "A files database for nixpkgs";
homepage = "https://github.com/bennofs/nix-index";
2017-07-23 21:09:54 +00:00
license = with licenses; [ bsd3 ];
maintainers = with maintainers; [ bennofs ncfavier ];
2017-07-23 21:09:54 +00:00
};
}