From fef0be91bebcfb818219258a2e5caf0d37d4f02d Mon Sep 17 00:00:00 2001 From: Geoffry Song Date: Wed, 20 Mar 2024 02:12:03 +0000 Subject: [PATCH] server: replace cargoHash with cargoLock.lockFile --- server/default.nix | 2 +- update-server-sha256.sh | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) delete mode 100755 update-server-sha256.sh diff --git a/server/default.nix b/server/default.nix index 7008e43..ac480d3 100644 --- a/server/default.nix +++ b/server/default.nix @@ -17,7 +17,7 @@ in { name = "Cargo.lock"; path = "${./Cargo.lock}"; } { name = "src"; path = "${./src}"; } ]; - cargoHash = "sha256-1JB9GCJpiyYjAghUXQphUuUUJmRRxutbW+NXNDM83c4="; + cargoLock.lockFile = ./Cargo.lock; checkPhase = "true"; target = "x86_64-unknown-linux-musl"; } diff --git a/update-server-sha256.sh b/update-server-sha256.sh deleted file mode 100755 index 6b6ee83..0000000 --- a/update-server-sha256.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -OLD_SHA256=$(nix eval --raw --impure --expr '(import ./build.nix {}).server.cargoHash') -NEW_SHA256=$(nix-shell -p nix-prefetch --command 'nix-prefetch -E "(import ./build.nix {}).serverCargoDeps"') -if [[ $OLD_SHA256 != $NEW_SHA256 ]]; then - printf "changing %s -> %s\n" "$OLD_SHA256" "$NEW_SHA256" - sed -i "s@$OLD_SHA256@$NEW_SHA256@g" server/default.nix -fi