2023-03-27 16:50:10 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, buildPackages
|
|
|
|
}:
|
2019-07-31 03:38:15 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "nfpm";
|
2023-12-28 15:43:49 +00:00
|
|
|
version = "2.35.1";
|
2019-07-31 03:38:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "goreleaser";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-12-28 15:43:49 +00:00
|
|
|
hash = "sha256-ew0iXtOKQIYxpyeNFBHD2F7KflTEQ7qHQMHYaL35Rvw=";
|
2019-07-31 03:38:15 +00:00
|
|
|
};
|
|
|
|
|
2023-12-21 03:01:02 +00:00
|
|
|
vendorHash = "sha256-P9jSQG6EyVGMZKtThy8Q7Y/pV7mbMl2eGrylea0VHRc=";
|
2019-10-19 21:20:00 +00:00
|
|
|
|
2021-08-26 06:45:51 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
|
2019-07-31 03:38:15 +00:00
|
|
|
|
2023-03-27 16:50:10 +00:00
|
|
|
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)
|
|
|
|
'';
|
|
|
|
|
2019-07-31 03:38:15 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A simple deb and rpm packager written in Go";
|
|
|
|
homepage = "https://github.com/goreleaser/nfpm";
|
2023-06-26 04:20:00 +00:00
|
|
|
changelog = "https://github.com/goreleaser/nfpm/releases/tag/v${version}";
|
2023-03-27 13:49:28 +00:00
|
|
|
maintainers = with maintainers; [ marsam techknowlogick caarlos0 ];
|
2022-03-19 03:24:36 +00:00
|
|
|
license = with licenses; [ mit ];
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "nfpm";
|
2019-07-31 03:38:15 +00:00
|
|
|
};
|
2020-07-31 03:58:04 +00:00
|
|
|
}
|