vendor hash
This commit is contained in:
parent
e58e408d8b
commit
1300312318
6 changed files with 18 additions and 4 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -21,4 +21,5 @@
|
||||||
# Go workspace file
|
# Go workspace file
|
||||||
go.work
|
go.work
|
||||||
|
|
||||||
.direnv/
|
.direnv/
|
||||||
|
tmp
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
pkgs ? import <nixpkgs>,
|
pkgs ? import <nixpkgs>,
|
||||||
vendorHash ? "sha256-11gXzDYSbLWcOO7W7bx+Zea2mAJvgQkeKVigX5R1aS4=",
|
vendorHash ? "sha256-eU4m1ZF5MbNpEYMDTbVoORrBzyEzmSlZdmPa6D+tdNg=",
|
||||||
name ? "ps2.live",
|
name ? "ps2.live",
|
||||||
}: let
|
}: let
|
||||||
bin = binName: pkgs.buildGoModule {
|
bin = binName: pkgs.buildGoModule {
|
||||||
|
|
5
justfile
5
justfile
|
@ -1,2 +1,5 @@
|
||||||
dev cmd inner_port="8769":
|
dev cmd inner_port="8769":
|
||||||
ADDR=":{{inner_port}}" air -build.cmd="go build -o ./tmp/main ./cmd/{{cmd}}" -proxy.app_port="{{inner_port}}"
|
ADDR=":{{inner_port}}" air -build.cmd="go build -o ./tmp/main ./cmd/{{cmd}}" -proxy.app_port="{{inner_port}}"
|
||||||
|
|
||||||
|
update-vendor-hash:
|
||||||
|
scripts/update-vendor-hash.sh
|
11
scripts/update-vendor-hash.sh
Executable file
11
scripts/update-vendor-hash.sh
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/usr/bin/env nix-shell
|
||||||
|
#!nix-shell -i bash -p nix -p coreutils -p gnused -p gawk -p prefetch-npm-deps
|
||||||
|
|
||||||
|
set -exuo pipefail
|
||||||
|
|
||||||
|
# Go
|
||||||
|
go mod tidy
|
||||||
|
failedbuild=$(nix build --impure --expr '(with import <nixpkgs> {}; pkgs.callPackage ./. { vendorHash = ""; }).ps2live' 2>&1 || true)
|
||||||
|
echo "$failedbuild"
|
||||||
|
checksum=$(echo "$failedbuild" | awk '/got:.*sha256/ { print $2 }')
|
||||||
|
sed -i -e "s|vendorHash ? \".*\"|vendorHash ? \"$checksum\"|" default.nix
|
|
@ -1 +0,0 @@
|
||||||
exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1
|
|
BIN
tmp/main
BIN
tmp/main
Binary file not shown.
Loading…
Add table
Reference in a new issue