mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-05 19:53:43 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
45 lines
1.1 KiB
Nix
45 lines
1.1 KiB
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
, stdenv
|
|
, darwin
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "git-ignore";
|
|
version = "1.4.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "sondr3";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-KIdhsbD9v2kCM2C/kSJCleyniEz4Bw7UxBsF762fnJs=";
|
|
};
|
|
|
|
cargoHash = "sha256-UicChl0wD2GSCCHAqF4/FKVq15g9qusNOnNJJW2B/nw=";
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
];
|
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.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 ];
|
|
mainProgram = "git-ignore";
|
|
};
|
|
}
|