forked from mirrors/gomod2nix
d7830bd5b2
Now that we're hashing files directly from the Go sources on the host system we need to avoid these files. Closes #49.
12 lines
289 B
Bash
12 lines
289 B
Bash
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)
|
|
|
|
cp -r $dir $out
|
|
|
|
find $out -iname ".ds_store" | xargs -r rm -r
|