aboutsummaryrefslogblamecommitdiff
path: root/nix/builder/fetch.sh
blob: 8c6bdb37d9a1774f3e8e275e80d0306310548cad (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
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