diff --git a/pkgs/build-support/go/garble.nix b/pkgs/build-support/go/garble.nix index 27277d1b992..da1e3152ba4 100644 --- a/pkgs/build-support/go/garble.nix +++ b/pkgs/build-support/go/garble.nix @@ -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/";