fix: 💚 Fix the Nix build, remove dependency on PNPM

This commit is contained in:
Jesse Wierzbinski 2025-07-06 02:25:06 +02:00
parent 30bb801f9f
commit eb096c5991
No known key found for this signature in database
8 changed files with 71 additions and 6899 deletions

View file

@ -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..."