v2ray: fixups and change to buildGoModule

This commit is contained in:
Serval
2019-11-28 02:10:37 +08:00
parent 740e85f847
commit 899d38170c
4 changed files with 7 additions and 233 deletions
+1 -5
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq vgo2nix
#!nix-shell -i bash -p curl jq
set -eo pipefail
version_nix=$(dirname "$0")/default.nix
@@ -28,10 +28,6 @@ if [[ $core_rev != $old_core_rev ]]; then
nix-prefetch-url --unpack --print-path "https://github.com/v2ray/v2ray-core/archive/$core_rev.zip"
)
echo "Generating deps.nix..." >&2
# `outfile` is required to be absolute path
vgo2nix -dir "$store_path" -outfile "$(realpath "$deps_nix")"
sed --in-place \
-e "s/\bversion = \".*\"/version = \"$(echo "$core_rev" | tail -c+2)\"/" \
-e "s/\bsha256 = \".*\"/sha256 = \"$hash\"/" \