2022-07-22 14:20:52 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildGoModule
|
|
|
|
, pandoc
|
|
|
|
, installShellFiles
|
|
|
|
, nix-update-script
|
|
|
|
, testers
|
|
|
|
, eget
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "eget";
|
2024-06-21 00:18:30 +00:00
|
|
|
version = "1.3.4";
|
2022-07-22 14:20:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zyedidia";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-06-21 00:18:30 +00:00
|
|
|
sha256 = "sha256-jhVUYyp6t5LleVotQQme07IJVdVnIOVFFtKEmzt8e2k=";
|
2022-07-22 14:20:52 +00:00
|
|
|
};
|
|
|
|
|
2023-09-13 04:44:46 +00:00
|
|
|
vendorHash = "sha256-A3lZtV0pXh4KxINl413xGbw2Pz7OzvIQiFSRubH428c=";
|
2022-07-22 14:20:52 +00:00
|
|
|
|
|
|
|
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 = {
|
2022-12-25 22:11:14 +00:00
|
|
|
updateScript = nix-update-script { };
|
2022-07-22 14:20:52 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|