mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-21 21:23:06 +00:00
0fc2c5be22
Diff: https://github.com/goreleaser/nfpm/compare/v2.31.0...v2.32.0 Changelog: https://github.com/goreleaser/nfpm/releases/tag/v2.32.0
45 lines
1.2 KiB
Nix
45 lines
1.2 KiB
Nix
{ stdenv
|
|
, lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
, buildPackages
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "nfpm";
|
|
version = "2.32.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "goreleaser";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-qxxa7V96cJJLu9Ki2NL5UreRyiR9sPhIVA9cllF4y70=";
|
|
};
|
|
|
|
vendorHash = "sha256-lVejUufXI5Ihv7hU1N8/MHrwUgIfaHmcj1MR0RTsKVU=";
|
|
|
|
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 = with lib; {
|
|
description = "A 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 maintainers; [ marsam techknowlogick caarlos0 ];
|
|
license = with licenses; [ mit ];
|
|
};
|
|
}
|