Merge master into staging-next
This commit is contained in:
@@ -149,7 +149,19 @@ checkout_hash(){
|
||||
fi
|
||||
|
||||
clean_git fetch -t ${builder:+--progress} origin || return 1
|
||||
clean_git checkout -b "$branchName" "$hash" || return 1
|
||||
|
||||
local object_type=$(git cat-file -t "$hash")
|
||||
if [[ "$object_type" == "commit" ]]; then
|
||||
clean_git checkout -b "$branchName" "$hash" || return 1
|
||||
elif [[ "$object_type" == "tree" ]]; then
|
||||
clean_git config user.email "nix-prefetch-git@localhost"
|
||||
clean_git config user.name "nix-prefetch-git"
|
||||
local commit_id=$(git commit-tree "$hash" -m "Commit created from tree hash $hash")
|
||||
clean_git checkout -b "$branchName" "$commit_id" || return 1
|
||||
else
|
||||
echo "Unrecognized git object type: $object_type"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Fetch only a branch/tag and checkout it.
|
||||
|
||||
@@ -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/";
|
||||
|
||||
Reference in New Issue
Block a user