summaryrefslogtreecommitdiff
path: root/overlays/lego.nix
blob: 2a6ef548cfb49418eb5e059bcb4bd0554864f0c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
prev: final: let
  zerossl = prev.fetchpatch {
    url = "https://patch-diff.githubusercontent.com/raw/go-acme/lego/pull/1501.patch";
    hash = "sha256-hLuWX607T8tcqljpBzEADViZd2FABkCgjNCLXMyWpuA=";
  };
in {
  lego = prev.buildGoModule rec {
    pname = "lego";
    version = "4.6.0";

    src = prev.fetchFromGitHub {
      owner = "go-acme";
      repo = pname;
      rev = "v${version}";
      sha256 = "sha256-FisQS/qbl7f4aszc2Ft6nmuHNrDreOQdN0jrWMOvaAk=";
    };
    patches = [zerossl];

    vendorSha256 = "sha256-cLM4YGguQf7lO5PUPmd/at1Aqrp9m8zFG6GWqcduJmw=";

    doCheck = false;

    subPackages = [ "cmd/lego" ];

    ldflags = [
      "-X main.version=${version}"
    ];
  };
}