diff options
Diffstat (limited to 'nix/builder/fetch.sh')
-rw-r--r-- | nix/builder/fetch.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nix/builder/fetch.sh b/nix/builder/fetch.sh new file mode 100644 index 0000000..8c6bdb3 --- /dev/null +++ b/nix/builder/fetch.sh @@ -0,0 +1,13 @@ +source $stdenv/setup + +export HOME=$(mktemp -d) + +# Call once first outside of subshell for better error reporting +go mod download "$goPackagePath@$version" + +dir=$(go mod download --json "$goPackagePath@$version" | jq -r .Dir) + +chmod -R +w $dir +find $dir -iname ".ds_store" | xargs -r rm -rf + +cp -r $dir $out |