Skip to content

Commit aa4d9f9

Browse files
committed
try to fix appimage generation
1 parent 74c98a5 commit aa4d9f9

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

appimage.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ stdenv.mkDerivation {
55
name = "appimage";
66
buildInputs = [ appimagetool ];
77
buildCommand = ''
8-
appimagetool ${dir}/*.AppDir
8+
ARCH=x86_64 appimagetool ${dir}/*.AppDir
99
mkdir $out
1010
cp *.AppImage $out
1111
'';

appimagetool.nix

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ stdenv, fetchurl, fuse, zlib, squashfsTools }:
1+
{ stdenv, fetchurl, fuse, zlib, squashfsTools, glib }:
22

33
# This is from some binaries.
44

@@ -31,7 +31,15 @@ stdenv.mkDerivation rec {
3131
installPhase = ''
3232
mkdir -p $out
3333
cp -r usr/* $out
34+
35+
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
36+
--set-rpath ${stdenv.glibc.out}/lib:${fuse}/lib:${zlib}/lib:${glib}/lib \
37+
$out/bin/appimagetool
38+
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
39+
--set-rpath ${zlib}/lib \
40+
$out/bin/mksquashfs
3441
'';
3542

43+
dontStrip = true;
3644
dontPatchELF = true;
3745
}

0 commit comments

Comments
 (0)