diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2022-07-19 16:53:55 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2022-07-19 16:53:55 +0200 |
commit | aac8ee19d7ef80f437714f882ec8e32b06d00f41 (patch) | |
tree | b6b022091aa6d20d06c7d343a28756af7faad3c9 /nix/builder/fetch.sh | |
parent | 9ce0d22c99472534838c1afe7c6dffdd0aa659a8 (diff) | |
download | bottin-aac8ee19d7ef80f437714f882ec8e32b06d00f41.tar.gz bottin-aac8ee19d7ef80f437714f882ec8e32b06d00f41.zip |
Add Nix packaging
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 |