mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-19 12:14:10 +00:00
4a239294b2
Diff: https://github.com/sondr3/git-ignore/compare/v1.2.0...v1.2.2 Changelog: https://github.com/sondr3/git-ignore/blob/v1.2.2/CHANGELOG.md
44 lines
1.0 KiB
Nix
44 lines
1.0 KiB
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
, stdenv
|
|
, darwin
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "git-ignore";
|
|
version = "1.2.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "sondr3";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-kIRuoY0dM2t+aY4iYdik9gUpG+81sDiJLD11Bmx68FI=";
|
|
};
|
|
|
|
cargoHash = "sha256-6sb+OW5VtA6vY6fDtsaZePZD53ehH7QawxJJlUNsrnM=";
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
];
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
darwin.apple_sdk.frameworks.Security
|
|
];
|
|
|
|
postInstall = ''
|
|
assets=$releaseDir/../assets
|
|
installManPage $assets/git-ignore.1
|
|
installShellCompletion $assets/git-ignore.{bash,fish} --zsh $assets/_git-ignore
|
|
'';
|
|
|
|
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 ];
|
|
};
|
|
}
|