nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 buildGoModule,
5 pandoc,
6 installShellFiles,
7 nix-update-script,
8 testers,
9}:
10
11buildGoModule (finalAttrs: {
12 pname = "eget";
13 version = "1.3.4";
14
15 src = fetchFromGitHub {
16 owner = "zyedidia";
17 repo = "eget";
18 tag = "v${finalAttrs.version}";
19 sha256 = "sha256-jhVUYyp6t5LleVotQQme07IJVdVnIOVFFtKEmzt8e2k=";
20 };
21
22 vendorHash = "sha256-A3lZtV0pXh4KxINl413xGbw2Pz7OzvIQiFSRubH428c=";
23
24 ldflags = [
25 "-s"
26 "-w"
27 "-X main.Version=v${finalAttrs.version}"
28 ];
29
30 nativeBuildInputs = [
31 pandoc
32 installShellFiles
33 ];
34
35 postInstall = ''
36 rm $out/bin/{test,tools}
37 pandoc man/eget.md -s -t man -o eget.1
38 installManPage eget.1
39 '';
40
41 passthru = {
42 updateScript = nix-update-script { };
43 tests.version = testers.testVersion {
44 package = finalAttrs.finalPackage;
45 command = "eget -v";
46 version = "v${finalAttrs.version}";
47 };
48 };
49
50 meta = {
51 description = "Easily install prebuilt binaries from GitHub";
52 homepage = "https://github.com/zyedidia/eget";
53 license = lib.licenses.mit;
54 maintainers = with lib.maintainers; [ zendo ];
55 };
56})