Commit d4889256 authored by figsoda's avatar figsoda Committed by Benno Fünfstück
Browse files
parent 74348e17
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -4,32 +4,32 @@

rustPlatform.buildRustPackage rec {
  pname = "nix-index";
  version = "0.1.6";
  version = "0.1.7";

  src = fetchFromGitHub {
    owner = "bennofs";
    owner = "nix-community";
    repo = "nix-index";
    rev = "v${version}";
    sha256 = "sha256-mdK63qRVvISRbRwfMel4SYucmBxR6RLbM4IFz3K3Pks=";
    hash = "sha256-WPWd2aMuP4L17UDFz7SI6lqyrCzrPV8c88vGyO6r6jk=";
  };

  cargoHash = "sha256-uIGxCaFj4x1Ck/D2xxOlosJaGSVbOKxbXAEAkkBxyaQ=";
  cargoHash = "sha256-zZhQ3pOid7BCGzcyCrl6sDm0q6IEVKF7K+d6nVs9flk=";

  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"
    substituteInPlace command-not-found.sh \
      --subst-var out
    install -Dm555 command-not-found.sh -t $out/etc/profile.d
  '';

  meta = with lib; {
    description = "A files database for nixpkgs";
    homepage = "https://github.com/bennofs/nix-index";
    homepage = "https://github.com/nix-community/nix-index";
    changelog = "https://github.com/nix-community/nix-index/blob/${src.rev}/CHANGELOG.md";
    license = with licenses; [ bsd3 ];
    maintainers = with maintainers; [ bennofs ncfavier ];
    maintainers = with maintainers; [ bennofs figsoda ncfavier ];
  };
}