mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
36 lines
998 B
Nix
36 lines
998 B
Nix
{ lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config, openssl, curl, sqlite
|
|
, Security
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "nix-index";
|
|
version = "0.1.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "bennofs";
|
|
repo = "nix-index";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-/btQP7I4zpIA0MWEQJVYnR1XhyudPnYD5Qx4vrW+Uq8=";
|
|
};
|
|
|
|
cargoSha256 = "sha256-CzLBOLtzIYqdWjTDKHVnc1YXXyj1HqvXzoFYHS0qxog=";
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
buildInputs = [ openssl curl sqlite ]
|
|
++ lib.optional stdenv.isDarwin Security;
|
|
|
|
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; {
|
|
description = "A files database for nixpkgs";
|
|
homepage = "https://github.com/bennofs/nix-index";
|
|
license = with licenses; [ bsd3 ];
|
|
maintainers = with maintainers; [ bennofs ncfavier ];
|
|
};
|
|
}
|