Files
nixpkgs/pkgs/by-name/nf/nfpm/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

56 lines
1.3 KiB
Nix

{
stdenv,
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
buildPackages,
}:
buildGoModule rec {
pname = "nfpm";
version = "2.43.2";
src = fetchFromGitHub {
owner = "goreleaser";
repo = "nfpm";
rev = "v${version}";
hash = "sha256-RHYGVSR/hMekaNoIxBP2zw3RZi/SSj4RlSMJNvgbigw=";
};
vendorHash = "sha256-7OhiaB0PpwvFj+yLyoN0+/qpF+p/c/Vw+7Tn2XVYYjg=";
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];
nativeBuildInputs = [ installShellFiles ];
postInstall =
let
emulator = stdenv.hostPlatform.emulator buildPackages;
in
''
${emulator} $out/bin/nfpm man > nfpm.1
installManPage ./nfpm.1
installShellCompletion --cmd nfpm \
--bash <(${emulator} $out/bin/nfpm completion bash) \
--fish <(${emulator} $out/bin/nfpm completion fish) \
--zsh <(${emulator} $out/bin/nfpm completion zsh)
'';
meta = {
description = "Simple deb and rpm packager written in Go";
homepage = "https://github.com/goreleaser/nfpm";
changelog = "https://github.com/goreleaser/nfpm/releases/tag/v${version}";
maintainers = with lib.maintainers; [
techknowlogick
caarlos0
];
license = with lib.licenses; [ mit ];
mainProgram = "nfpm";
};
}