gomod2nix/builder/fetch.sh

11 lines
245 B
Bash
Raw Normal View History

2022-05-28 13:49:49 +00:00
source $stdenv/setup
export HOME=$(mktemp -d)
# Call once first outside of subshell for better error reporting
go mod download -x "$goPackagePath@$version"
dir=$(go mod download --json "$goPackagePath@$version" | jq -r .Dir)
cp -r $dir $out