nixpkgs/pkgs/applications/version-management/git-and-tools/git-ignore/default.nix

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

37 lines
1.0 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, installShellFiles, rustPlatform, pkg-config, openssl, darwin }:
with rustPlatform;
buildRustPackage rec {
2019-04-19 14:34:40 +00:00
pname = "git-ignore";
2022-05-17 02:20:59 +00:00
version = "1.2.0";
src = fetchFromGitHub {
owner = "sondr3";
2019-04-19 14:34:40 +00:00
repo = pname;
rev = "v${version}";
2022-05-17 02:20:59 +00:00
sha256 = "sha256-Bfr+4zDi6QqirlqccW1jU95eb4q82ZFG9LtT2mCPYLc=";
};
2022-05-17 02:20:59 +00:00
cargoSha256 = "sha256-ehEUI4M2IxqS6QhyqOncwP+w6IGbIlSFNIP/FEVH/JI=";
2019-04-19 14:34:40 +00:00
nativeBuildInputs = [ pkg-config installShellFiles ];
buildInputs = [ openssl ]
2021-01-15 13:21:58 +00:00
++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
];
2022-05-17 02:20:59 +00:00
postInstall = ''
installManPage assets/git-ignore.1
2022-05-17 02:51:42 +00:00
# There's also .elv and .ps1 completion files but I don't know where to install those
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";
license = licenses.gpl3Plus;
2022-07-30 16:57:56 +00:00
maintainers = [ ];
};
}