From 74e5ee1cf73fe4f86b1b467b5f7a8c7f998aa0f8 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 26 Feb 2022 16:27:33 +0100 Subject: ... --- overlays/lego.nix | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/overlays/lego.nix b/overlays/lego.nix index 0c2811df..2a6ef548 100644 --- a/overlays/lego.nix +++ b/overlays/lego.nix @@ -1,9 +1,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.lego.overrideDerivation (oldAttrs: { - patches = oldAttrs.patches ++ [zerossl]; - }); + 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}" + ]; + }; } -- cgit v1.2.3