Skip to content

Commit

Permalink
nixos/tests/letsencrypt: Fix go source install
Browse files Browse the repository at this point in the history
Since e95f17e, 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 <[email protected]>
  • Loading branch information
aszlig committed Jul 12, 2018
1 parent 4794aa5 commit c21b1ed
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions nixos/tests/common/letsencrypt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit c21b1ed

Please sign in to comment.