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