depot/third_party/nixpkgs/pkgs/by-name/at/athens/package.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

44 lines
1,015 B
Nix

{ lib
, fetchFromGitHub
, buildGoModule
, testers
, athens
}:
buildGoModule rec {
pname = "athens";
version = "0.14.1";
src = fetchFromGitHub {
owner = "gomods";
repo = "athens";
rev = "v${version}";
hash = "sha256-vpg5EcQSxVFjDFKa4oHwF5fNHhLWtj3ZMi2wbMZNn/8=";
};
vendorHash = "sha256-LajNPzGbWqW+9aqiquk2LvSUjKwi1gbDY4cKXmn3PWk=";
CGO_ENABLED = "0";
ldflags = [ "-s" "-w" "-X github.com/gomods/athens/pkg/build.version=${version}" ];
subPackages = [ "cmd/proxy" ];
postInstall = ''
mv $out/bin/proxy $out/bin/athens
'';
passthru = {
tests.version = testers.testVersion {
package = athens;
};
};
meta = with lib; {
description = "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;
};
}