Skip to content

Commit 4e2a717

Browse files
committed
fix fingerprint placeholder
1 parent 34d7e56 commit 4e2a717

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

default.nix

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,19 +137,16 @@ let
137137
$zip $out/bin/nix-portable.zip ${caBundleZstd}
138138
139139
# create fingerprint
140-
fp=$(sha256sum $out/bin/nix-portable.zip | cut -d " " -f 1)
141-
sed -i "s/_FINGERPRINT_PLACEHOLDER_/$fp/g" $out/bin/nix-portable.zip
142-
# fix broken zip header due to manual modification
143-
${zip}/bin/zip -F $out/bin/nix-portable.zip --out $out/bin/nix-portable-fixed.zip
140+
fp=$(sha256sum $out/bin/nix-portable.zip | head -c64)
141+
sed -i "0,/_FINGERPRINT_PLACEHOLDER_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/s//$fp/" $out/bin/nix-portable.zip
144142
145-
rm $out/bin/nix-portable.zip
146143
executable=${if bundledPackage == null then "" else bundledExe}
147144
if [ "$executable" == "" ]; then
148145
target="$out/bin/nix-portable"
149146
else
150147
target="$out/bin/$(basename "$executable")"
151148
fi
152-
mv $out/bin/nix-portable-fixed.zip "$target"
149+
mv $out/bin/nix-portable.zip "$target"
153150
chmod +x "$target"
154151
'';
155152
in

runtimeScript.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fi
5050
self="$(realpath "${BASH_SOURCE[0]}")"
5151

5252
# fingerprint will be inserted by builder
53-
fingerprint="_FINGERPRINT_PLACEHOLDER_"
53+
fingerprint="_FINGERPRINT_PLACEHOLDER_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
5454

5555
# user specified location for program files and nix store
5656
[ -z "$NP_LOCATION" ] && NP_LOCATION="$HOME"

0 commit comments

Comments
 (0)