Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 43 lines 1.1 kB view raw
1{ stdenv 2, lib 3, buildGoModule 4, fetchFromGitHub 5, installShellFiles 6, buildPackages 7}: 8 9buildGoModule rec { 10 pname = "nfpm"; 11 version = "2.29.0"; 12 13 src = fetchFromGitHub { 14 owner = "goreleaser"; 15 repo = pname; 16 rev = "v${version}"; 17 sha256 = "sha256-/29+InrmsceVEAvC0eV9Xj+js8HNLi4wSUzOIt8myqw="; 18 }; 19 20 vendorHash = "sha256-E1/Wf2NyRurEAtu+lD6jPrh7DDNyQr5wh0RHzANhg2U="; 21 22 ldflags = [ "-s" "-w" "-X main.version=${version}" ]; 23 24 nativeBuildInputs = [ installShellFiles ]; 25 26 postInstall = 27 let emulator = stdenv.hostPlatform.emulator buildPackages; 28 in '' 29 ${emulator} $out/bin/nfpm man > nfpm.1 30 installManPage ./nfpm.1 31 installShellCompletion --cmd nfpm \ 32 --bash <(${emulator} $out/bin/nfpm completion bash) \ 33 --fish <(${emulator} $out/bin/nfpm completion fish) \ 34 --zsh <(${emulator} $out/bin/nfpm completion zsh) 35 ''; 36 37 meta = with lib; { 38 description = "A simple deb and rpm packager written in Go"; 39 homepage = "https://github.com/goreleaser/nfpm"; 40 maintainers = with maintainers; [ marsam techknowlogick caarlos0 ]; 41 license = with licenses; [ mit ]; 42 }; 43}