nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, fetchFromGitHub, buildGoModule, nixosTests }:
2
3buildGoModule rec {
4 pname = "lego";
5 version = "4.12.1";
6
7 src = fetchFromGitHub {
8 owner = "go-acme";
9 repo = pname;
10 rev = "v${version}";
11 sha256 = "sha256-NmJQkNdqki1La6yt7cFY0sAEz9Ksrx3hWmWOTUMST+g=";
12 };
13
14 vendorHash = "sha256-Pwtvv/qVX91yWx49IYdveVCySoVxekvHomfAzOdFj7w=";
15
16 doCheck = false;
17
18 subPackages = [ "cmd/lego" ];
19
20 ldflags = [
21 "-X main.version=${version}"
22 ];
23
24 meta = with lib; {
25 description = "Let's Encrypt client and ACME library written in Go";
26 license = licenses.mit;
27 homepage = "https://go-acme.github.io/lego/";
28 maintainers = teams.acme.members;
29 };
30
31 passthru.tests.lego = nixosTests.acme;
32}