Merge pull request #276421 from katexochen/athens/ref
athens: refactor, add version test
This commit is contained in:
commit
eb95ddc47b
1 changed files with 11 additions and 4 deletions
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue