Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 13 lines 472 B view raw
1diff --git a/scripts/gen-randstruct-seed.sh b/scripts/gen-randstruct-seed.sh 2index 61017b36c464..7bb494dd2e18 100755 3--- a/scripts/gen-randstruct-seed.sh 4+++ b/scripts/gen-randstruct-seed.sh 5@@ -1,7 +1,7 @@ 6 #!/bin/sh 7 # SPDX-License-Identifier: GPL-2.0 8 9-SEED=$(od -A n -t x8 -N 32 /dev/urandom | tr -d ' \n') 10+SEED="NIXOS_RANDSTRUCT_SEED" 11 echo "$SEED" > "$1" 12 HASH=$(echo -n "$SEED" | sha256sum | cut -d" " -f1) 13 echo "#define RANDSTRUCT_HASHED_SEED \"$HASH\"" > "$2"