depot/third_party/nixpkgs/pkgs/tools/misc/eget/default.nix
Default email 4bac34ead1 Project import generated by Copybara.
GitOrigin-RevId: 724bfc0892363087709bd3a5a1666296759154b1
2023-02-09 12:40:11 +01:00

48 lines
1 KiB
Nix

{ lib
, fetchFromGitHub
, buildGoModule
, pandoc
, installShellFiles
, nix-update-script
, testers
, eget
}:
buildGoModule rec {
pname = "eget";
version = "1.3.2";
src = fetchFromGitHub {
owner = "zyedidia";
repo = pname;
rev = "v${version}";
sha256 = "sha256-tUHA5LbTOz20ydMM8141VjCUBsxI+Wzkgfh27aq/2y4=";
};
vendorSha256 = "sha256-J8weaJSC+k8BnijG2Jm2GYUZmEhASrrCDxb46ZGmCMI=";
ldflags = [ "-s" "-w" "-X main.Version=v${version}" ];
nativeBuildInputs = [ pandoc installShellFiles ];
postInstall = ''
pandoc man/eget.md -s -t man -o eget.1
installManPage eget.1
'';
passthru = {
updateScript = nix-update-script { };
tests.version = testers.testVersion {
package = eget;
command = "eget -v";
version = "v${version}";
};
};
meta = with lib; {
description = "Easily install prebuilt binaries from GitHub";
homepage = "https://github.com/zyedidia/eget";
license = licenses.mit;
maintainers = with maintainers; [ zendo ];
};
}