File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 '' ;
155152in
Original file line number Diff line number Diff line change 5050self=" $( 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 "
You can’t perform that action at this time.
0 commit comments