mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-10 06:55:10 +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.2 KiB
Nix
45 lines
1.2 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "changelogger";
|
|
version = "0.6.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "MarkusFreitag";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-XDiO8r1HpdsfBKzFLnsWdxte2EqL1blPH21137fNm5M=";
|
|
};
|
|
|
|
vendorHash = "sha256-E6J+0tZriskBnXdhQOQA240c3z+laXM5honoREjHPfM=";
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X github.com/MarkusFreitag/changelogger/cmd.BuildVersion=${version}"
|
|
"-X github.com/MarkusFreitag/changelogger/cmd.BuildDate=1970-01-01T00:00:00"
|
|
];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
installShellCompletion --cmd changelogger \
|
|
--bash <($out/bin/changelogger completion bash) \
|
|
--fish <($out/bin/changelogger completion fish) \
|
|
--zsh <($out/bin/changelogger completion zsh)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Tool to manage your changelog file in Markdown";
|
|
homepage = "https://github.com/MarkusFreitag/changelogger";
|
|
changelog = "https://github.com/MarkusFreitag/changelogger/blob/v${version}/CHANGELOG.md";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ tomsiewert ];
|
|
mainProgram = "changelogger";
|
|
};
|
|
}
|