nixpkgs/pkgs/by-name/gi/git-ignore/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.1 KiB
Nix
Raw Normal View History

{ lib
, rustPlatform
, fetchFromGitHub
, installShellFiles
, stdenv
, darwin
}:
rustPlatform.buildRustPackage rec {
2019-04-19 14:34:40 +00:00
pname = "git-ignore";
2024-07-23 13:24:09 +00:00
version = "1.4.0";
src = fetchFromGitHub {
owner = "sondr3";
2019-04-19 14:34:40 +00:00
repo = pname;
rev = "v${version}";
2024-07-23 13:24:09 +00:00
hash = "sha256-KIdhsbD9v2kCM2C/kSJCleyniEz4Bw7UxBsF762fnJs=";
};
2024-07-23 13:24:09 +00:00
cargoHash = "sha256-UicChl0wD2GSCCHAqF4/FKVq15g9qusNOnNJJW2B/nw=";
nativeBuildInputs = [
installShellFiles
];
2019-04-19 14:34:40 +00:00
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.Security
];
2022-05-17 02:20:59 +00:00
postInstall = ''
assets=$releaseDir/../assets
installManPage $assets/git-ignore.1
installShellCompletion $assets/git-ignore.{bash,fish} --zsh $assets/_git-ignore
2019-04-19 14:34:40 +00:00
'';
meta = with lib; {
description = "Quickly and easily fetch .gitignore templates from gitignore.io";
homepage = "https://github.com/sondr3/git-ignore";
changelog = "https://github.com/sondr3/git-ignore/blob/${src.rev}/CHANGELOG.md";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ figsoda ];
2023-11-27 01:17:53 +00:00
mainProgram = "git-ignore";
};
}