2023-11-04 00:13:35 +01:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
2023-12-24 09:29:56 +01:00
|
|
|
, buildGoModule
|
2023-12-24 09:45:34 +01:00
|
|
|
, testers
|
|
|
|
, athens
|
2023-11-04 00:13:35 +01:00
|
|
|
}:
|
2023-12-24 09:29:56 +01:00
|
|
|
buildGoModule rec {
|
2023-11-04 00:13:35 +01:00
|
|
|
pname = "athens";
|
2023-12-12 09:37:06 +01:00
|
|
|
version = "0.13.0";
|
2023-11-04 00:13:35 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gomods";
|
2023-12-24 09:46:43 +01:00
|
|
|
repo = "athens";
|
2023-11-04 00:13:35 +01:00
|
|
|
rev = "v${version}";
|
2023-12-12 09:37:06 +01:00
|
|
|
hash = "sha256-27BBPDK5lGwEFsgLf+/lE9CM8g1AbGUgM1iOL7XZqsU=";
|
2023-11-04 00:13:35 +01:00
|
|
|
};
|
|
|
|
|
2023-12-12 09:37:06 +01:00
|
|
|
vendorHash = "sha256-5U9ql0wszhr5H3hAo2utONuEh4mUSiO71XQHkAnMhZU=";
|
2023-11-04 00:13:35 +01:00
|
|
|
|
|
|
|
CGO_ENABLED = "0";
|
|
|
|
ldflags = [ "-s" "-w" "-buildid=" "-X github.com/gomods/athens/pkg/build.version=${version}" ];
|
|
|
|
|
|
|
|
subPackages = [ "cmd/proxy" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/proxy $out/bin/athens
|
|
|
|
'';
|
|
|
|
|
2023-12-24 09:45:34 +01:00
|
|
|
passthru = {
|
|
|
|
tests.version = testers.testVersion {
|
|
|
|
package = athens;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-11-04 00:13:35 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A Go module datastore and proxy";
|
|
|
|
homepage = "https://github.com/gomods/athens";
|
|
|
|
changelog = "https://github.com/gomods/athens/releases/tag/v${version}";
|
|
|
|
license = licenses.mit;
|
|
|
|
mainProgram = "athens";
|
|
|
|
maintainers = with maintainers; [ katexochen malt3 ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|