2021-02-20 02:45:04 +01:00
|
|
|
{ stdenv
|
|
|
|
, buildGoModule
|
2021-02-10 09:22:57 +01:00
|
|
|
, fetchFromGitHub
|
|
|
|
, lib
|
2022-01-29 22:42:46 +01:00
|
|
|
, git
|
2021-02-10 09:22:57 +01:00
|
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "garble";
|
2022-01-29 22:42:46 +01:00
|
|
|
version = "0.5.1";
|
2021-02-10 09:22:57 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "burrowers";
|
|
|
|
repo = pname;
|
2022-01-29 22:42:46 +01:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-F8O/33o//yGnum9sZo1dzcvf3ifRalva6SDC36iPbDA==";
|
2021-02-10 09:22:57 +01:00
|
|
|
};
|
|
|
|
|
2022-01-29 22:42:46 +01:00
|
|
|
vendorSha256 = "sha256-iNH/iBEOTkIhVlDGfI66ZYyVjyH6WrLbUSMyONPjUc4=";
|
2021-02-10 09:22:57 +01:00
|
|
|
|
2022-01-29 22:42:46 +01:00
|
|
|
# Used for some of the tests.
|
|
|
|
checkInputs = [git];
|
|
|
|
|
|
|
|
preBuild = lib.optionalString (!stdenv.isx86_64) ''
|
2021-02-20 02:45:04 +01:00
|
|
|
# The test assumex amd64 assembly
|
|
|
|
rm testdata/scripts/asm.txt
|
|
|
|
'';
|
|
|
|
|
2021-02-10 09:22:57 +01: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-04 00:53:54 +01:00
|
|
|
broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/garble.x86_64-darwin
|
2021-02-10 09:22:57 +01:00
|
|
|
};
|
|
|
|
}
|