From 3443b693cc10522cf5513419ba7266afb0ce5da1 Mon Sep 17 00:00:00 2001 From: Bignaux Ronan Date: Wed, 4 Mar 2020 15:10:11 +0100 Subject: appimage: fix suspicious ownership --- pkgs/build-support/appimage/default.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'pkgs/build-support/appimage') diff --git a/pkgs/build-support/appimage/default.nix b/pkgs/build-support/appimage/default.nix index 7459a028f076e..c56aae4c599c5 100644 --- a/pkgs/build-support/appimage/default.nix +++ b/pkgs/build-support/appimage/default.nix @@ -13,7 +13,7 @@ rec { @sh "appimageSignature=\(.appimageSignature) appimageType=\(.appimageType)"') # check AppImage signature - if [[ $appimageSignature != "AI" ]]; then + if [[ "$appimageSignature" != "AI" ]]; then echo "Not an appimage." exit fi @@ -25,14 +25,13 @@ rec { ;; 2) - install $src ./appimage - # multiarch offset one-liner using same method as AppImage # see https://gist.github.com/probonopd/a490ba3401b5ef7b881d5e603fa20c93 - offset=$(r2 ./appimage -nn -Nqc "pfj.elf_header @ 0" |\ + offset=$(r2 $src -nn -Nqc "pfj.elf_header @ 0" |\ jq 'map({(.name): .value}) | add | .shoff + (.shnum * .shentsize)') - unsquashfs -q -d $out -o $offset ./appimage + unsquashfs -q -d $out -o $offset $src + chmod go-w $out ;; # 3) get ready, https://github.com/TheAssassin/type3-runtime -- cgit 1.4.1