From c21b1ede95de8bead6a83b8f182fd17f2c6a0ee0 Mon Sep 17 00:00:00 2001 From: aszlig Date: Thu, 12 Jul 2018 00:52:16 +0200 Subject: [PATCH] nixos/tests/letsencrypt: Fix go source install Since e95f17e2720e67e2eabd59d7754c814d3e27a0b2, Go packages no longer contain the source tree, however Boulder seems to need that as it generates a few files during build. Ideally we would only pick the files that are needed and put it into a separate output, but I currently don't have time for this so I'm marking this with XXX to get back to it later. Signed-off-by: aszlig --- nixos/tests/common/letsencrypt.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/nixos/tests/common/letsencrypt.nix b/nixos/tests/common/letsencrypt.nix index 2c86fe8d68b..d77491f4050 100644 --- a/nixos/tests/common/letsencrypt.nix +++ b/nixos/tests/common/letsencrypt.nix @@ -173,6 +173,21 @@ let rm -r go/src/github.com/letsencrypt/boulder/vendor/github.com/miekg/pkcs11 ''; + # XXX: Temporarily brought back putting the source code in the output, + # since e95f17e2720e67e2eabd59d7754c814d3e27a0b2 was removing that from + # buildGoPackage. + preInstall = '' + mkdir -p $out + pushd "$NIX_BUILD_TOP/go" + while read f; do + echo "$f" | grep -q '^./\(src\|pkg/[^/]*\)/${goPackagePath}' \ + || continue + mkdir -p "$(dirname "$out/share/go/$f")" + cp "$NIX_BUILD_TOP/go/$f" "$out/share/go/$f" + done < <(find . -type f) + popd + ''; + extraSrcs = map mkGoDep [ { goPackagePath = "github.com/miekg/pkcs11"; rev = "6dbd569b952ec150d1425722dbbe80f2c6193f83";