2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, installShellFiles, rustPlatform, pkg-config, openssl, darwin }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
with rustPlatform;
|
|
|
|
|
|
|
|
buildRustPackage rec {
|
|
|
|
pname = "git-ignore";
|
2022-05-18 14:49:53 +00:00
|
|
|
version = "1.2.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sondr3";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-05-18 14:49:53 +00:00
|
|
|
sha256 = "sha256-Bfr+4zDi6QqirlqccW1jU95eb4q82ZFG9LtT2mCPYLc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
cargoSha256 = "sha256-ehEUI4M2IxqS6QhyqOncwP+w6IGbIlSFNIP/FEVH/JI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config installShellFiles ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ openssl ]
|
2021-01-17 00:15:33 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [
|
2020-04-24 23:36:52 +00:00
|
|
|
darwin.apple_sdk.frameworks.Security
|
|
|
|
];
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
postInstall = ''
|
|
|
|
installManPage assets/git-ignore.1
|
|
|
|
# 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
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Quickly and easily fetch .gitignore templates from gitignore.io";
|
|
|
|
homepage = "https://github.com/sondr3/git-ignore";
|
|
|
|
license = licenses.gpl3Plus;
|
2022-08-12 12:06:08 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|