Merge pull request #276421 from katexochen/athens/ref

athens: refactor, add version test
This commit is contained in:
Mario Rodas 2023-12-24 11:48:09 -05:00 committed by GitHub
commit eb95ddc47b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,14 +1,16 @@
{ lib
, fetchFromGitHub
, buildGo121Module
, buildGoModule
, testers
, athens
}:
buildGo121Module rec {
buildGoModule rec {
pname = "athens";
version = "0.13.0";
src = fetchFromGitHub {
owner = "gomods";
repo = pname;
repo = "athens";
rev = "v${version}";
hash = "sha256-27BBPDK5lGwEFsgLf+/lE9CM8g1AbGUgM1iOL7XZqsU=";
};
@ -17,7 +19,6 @@ buildGo121Module rec {
CGO_ENABLED = "0";
ldflags = [ "-s" "-w" "-buildid=" "-X github.com/gomods/athens/pkg/build.version=${version}" ];
flags = [ "-trimpath" ];
subPackages = [ "cmd/proxy" ];
@ -25,6 +26,12 @@ buildGo121Module rec {
mv $out/bin/proxy $out/bin/athens
'';
passthru = {
tests.version = testers.testVersion {
package = athens;
};
};
meta = with lib; {
description = "A Go module datastore and proxy";
homepage = "https://github.com/gomods/athens";