Merge pull request #276421 from katexochen/athens/ref

athens: refactor, add version test

authored by Mario Rodas and committed by GitHub eb95ddc4 9092ae0f

+11 -4
+11 -4
pkgs/by-name/at/athens/package.nix
··· 1 { lib 2 , fetchFromGitHub 3 - , buildGo121Module 4 }: 5 - buildGo121Module rec { 6 pname = "athens"; 7 version = "0.13.0"; 8 9 src = fetchFromGitHub { 10 owner = "gomods"; 11 - repo = pname; 12 rev = "v${version}"; 13 hash = "sha256-27BBPDK5lGwEFsgLf+/lE9CM8g1AbGUgM1iOL7XZqsU="; 14 }; ··· 17 18 CGO_ENABLED = "0"; 19 ldflags = [ "-s" "-w" "-buildid=" "-X github.com/gomods/athens/pkg/build.version=${version}" ]; 20 - flags = [ "-trimpath" ]; 21 22 subPackages = [ "cmd/proxy" ]; 23 24 postInstall = '' 25 mv $out/bin/proxy $out/bin/athens 26 ''; 27 28 meta = with lib; { 29 description = "A Go module datastore and proxy";
··· 1 { lib 2 , fetchFromGitHub 3 + , buildGoModule 4 + , testers 5 + , athens 6 }: 7 + buildGoModule rec { 8 pname = "athens"; 9 version = "0.13.0"; 10 11 src = fetchFromGitHub { 12 owner = "gomods"; 13 + repo = "athens"; 14 rev = "v${version}"; 15 hash = "sha256-27BBPDK5lGwEFsgLf+/lE9CM8g1AbGUgM1iOL7XZqsU="; 16 }; ··· 19 20 CGO_ENABLED = "0"; 21 ldflags = [ "-s" "-w" "-buildid=" "-X github.com/gomods/athens/pkg/build.version=${version}" ]; 22 23 subPackages = [ "cmd/proxy" ]; 24 25 postInstall = '' 26 mv $out/bin/proxy $out/bin/athens 27 ''; 28 + 29 + passthru = { 30 + tests.version = testers.testVersion { 31 + package = athens; 32 + }; 33 + }; 34 35 meta = with lib; { 36 description = "A Go module datastore and proxy";