forked from rarias/jungle
Use nativeBuildInputs zip in nix-portable build
This commit is contained in:
@@ -593,7 +593,7 @@ let
|
|||||||
runtimeScriptEscaped = replaceStrings ["\""] ["\\\""] runtimeScript;
|
runtimeScriptEscaped = replaceStrings ["\""] ["\\\""] runtimeScript;
|
||||||
|
|
||||||
nixPortable = pkgs.runCommand pname {
|
nixPortable = pkgs.runCommand pname {
|
||||||
nativeBuildInputs = [unixtools.xxd unzip];
|
nativeBuildInputs = [unixtools.xxd unzip pkgs.zip];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "https://github.com/DavHau/nix-portable";
|
homepage = "https://github.com/DavHau/nix-portable";
|
||||||
@@ -621,7 +621,7 @@ let
|
|||||||
|
|
||||||
unzip -vl $out/bin/nix-portable.zip
|
unzip -vl $out/bin/nix-portable.zip
|
||||||
|
|
||||||
zip="${zip}/bin/zip -0"
|
zip="zip -0"
|
||||||
$zip $out/bin/nix-portable.zip ${bwrap}/bin/bwrap
|
$zip $out/bin/nix-portable.zip ${bwrap}/bin/bwrap
|
||||||
$zip $out/bin/nix-portable.zip ${nixStatic}/bin/nix
|
$zip $out/bin/nix-portable.zip ${nixStatic}/bin/nix
|
||||||
$zip $out/bin/nix-portable.zip ${zstd}/bin/zstd
|
$zip $out/bin/nix-portable.zip ${zstd}/bin/zstd
|
||||||
@@ -632,7 +632,7 @@ let
|
|||||||
fp=$(sha256sum $out/bin/nix-portable.zip | cut -d " " -f 1)
|
fp=$(sha256sum $out/bin/nix-portable.zip | cut -d " " -f 1)
|
||||||
sed -i "s/_FINGERPRINT_PLACEHOLDER_/$fp/g" $out/bin/nix-portable.zip
|
sed -i "s/_FINGERPRINT_PLACEHOLDER_/$fp/g" $out/bin/nix-portable.zip
|
||||||
# fix broken zip header due to manual modification
|
# fix broken zip header due to manual modification
|
||||||
${zip}/bin/zip -F $out/bin/nix-portable.zip --out $out/bin/nix-portable-fixed.zip
|
zip -F $out/bin/nix-portable.zip --out $out/bin/nix-portable-fixed.zip
|
||||||
|
|
||||||
rm $out/bin/nix-portable.zip
|
rm $out/bin/nix-portable.zip
|
||||||
executable=${if bundledPackage == null then "" else bundledExe}
|
executable=${if bundledPackage == null then "" else bundledExe}
|
||||||
|
|||||||
Reference in New Issue
Block a user