mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
fix: 💚 Fix the Nix build, remove dependency on PNPM
This commit is contained in:
parent
30bb801f9f
commit
eb096c5991
8 changed files with 71 additions and 6899 deletions
|
|
@ -1,11 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Step 1: Run pnpm install
|
||||
pnpm i --lockfile-only
|
||||
|
||||
# Step 2: Blank the hash in package.nix
|
||||
sed -i 's/hash = ".*";/hash = lib.fakeHash;/g' nix/package.nix
|
||||
sed -i 's/outputHash = ".*";/outputHash = lib.fakeHash;/g' nix/package.nix
|
||||
|
||||
echo "Running nix build to get the correct hash..."
|
||||
|
||||
|
|
@ -18,7 +15,7 @@ corrected_hash=$(echo "$build_output" | grep 'got:' | awk '{print $2}')
|
|||
echo "Corrected hash: $corrected_hash"
|
||||
|
||||
# Step 5: Replace the blank hash with the corrected one
|
||||
sed -i "s/hash = lib.fakeHash;/hash = \"$corrected_hash\";/g" nix/package.nix
|
||||
sed -i "s/outputHash = lib.fakeHash;/outputHash = \"$corrected_hash\";/g" nix/package.nix
|
||||
|
||||
echo "Rebuilding with the corrected hash..."
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue