garble: fix aarch64 build

This commit is contained in:
Ivan Babrou 2021-02-19 17:45:04 -08:00 committed by zowoq
parent 7e2baa21b5
commit c62662c962

View File

@ -1,4 +1,5 @@
{ buildGoModule
{ stdenv
, buildGoModule
, fetchFromGitHub
, lib
}:
@ -15,6 +16,15 @@ buildGoModule rec {
vendorSha256 = "sha256-x2fk2QmZDK2yjyfYdK7x+sQjvt7tuggmm8ieVjsNKek=";
preBuild = ''
# https://github.com/burrowers/garble/issues/184
substituteInPlace testdata/scripts/tiny.txt \
--replace "{6,8}" "{4,8}"
'' + lib.optionalString (!stdenv.isx86_64) ''
# The test assumex amd64 assembly
rm testdata/scripts/asm.txt
'';
meta = {
description = "Obfuscate Go code by wrapping the Go toolchain";
homepage = "https://github.com/burrowers/garble/";