mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
3e3118794f
* chore: add build targets to nix flake Enables `nix build github:coder/coder#main`! * Fix all packages * Add back pnpm * Update flake.nix Co-authored-by: Asher <ash@coder.com> * Remove yarn * fmt --------- Co-authored-by: Asher <ash@coder.com>
17 lines
394 B
Bash
Executable File
17 lines
394 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Updates SRI hashes for flake.nix.
|
|
|
|
set -eu
|
|
|
|
cd "$(dirname "${BASH_SOURCE[0]}")/.."
|
|
|
|
OUT=$(mktemp -d -t nar-hash-XXXXXX)
|
|
|
|
echo "Downloading Go modules..."
|
|
GOPATH="$OUT" go mod download
|
|
echo "Calculating SRI hash..."
|
|
HASH=$(go run tailscale.com/cmd/nardump --sri "$OUT/pkg/mod/cache/download")
|
|
sudo rm -rf "$OUT"
|
|
|
|
sed -i "s/\(vendorHash = \"\)[^\"]*/\1${HASH}/" ./flake.nix
|