2021-02-22 21:28:39 +00:00
|
|
|
{ stdenv
|
|
|
|
, buildGoModule
|
2021-02-19 19:06:45 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, lib
|
2022-02-10 20:34:41 +00:00
|
|
|
, git
|
2021-02-19 19:06:45 +00:00
|
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "garble";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "0.8.0";
|
2021-02-19 19:06:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "burrowers";
|
|
|
|
repo = pname;
|
2022-02-10 20:34:41 +00:00
|
|
|
rev = "v${version}";
|
2023-02-02 18:25:31 +00:00
|
|
|
sha256 = "sha256-f7coWG1CS4UL8GGqwADx5CvIk2sPONPlWW+JgRhFsb8=";
|
2021-02-19 19:06:45 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
vendorSha256 = "sha256-SOdIlu0QrQokl9j9Ff594+1K6twU1mCuECFQaVKaPV4=";
|
2021-02-19 19:06:45 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
# Used for some of the tests.
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [git];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
preBuild = lib.optionalString (!stdenv.isx86_64) ''
|
2021-02-22 21:28:39 +00:00
|
|
|
# The test assumex amd64 assembly
|
2022-09-30 11:47:45 +00:00
|
|
|
rm testdata/script/asm.txtar
|
2021-02-22 21:28:39 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-19 19:06:45 +00:00
|
|
|
meta = {
|
|
|
|
description = "Obfuscate Go code by wrapping the Go toolchain";
|
|
|
|
homepage = "https://github.com/burrowers/garble/";
|
|
|
|
maintainers = with lib.maintainers; [ davhau ];
|
|
|
|
license = lib.licenses.bsd3;
|
2022-01-07 04:07:37 +00:00
|
|
|
broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/garble.x86_64-darwin
|
2021-02-19 19:06:45 +00:00
|
|
|
};
|
|
|
|
}
|