try to fix appimage generation

This commit is contained in:
Matthew Bauer 2017-11-07 22:29:52 -06:00
parent 74c98a53ea
commit aa4d9f9880
2 changed files with 10 additions and 2 deletions

View File

@ -5,7 +5,7 @@ stdenv.mkDerivation {
name = "appimage";
buildInputs = [ appimagetool ];
buildCommand = ''
appimagetool ${dir}/*.AppDir
ARCH=x86_64 appimagetool ${dir}/*.AppDir
mkdir $out
cp *.AppImage $out
'';

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, fuse, zlib, squashfsTools }:
{ stdenv, fetchurl, fuse, zlib, squashfsTools, glib }:
# This is from some binaries.
@ -31,7 +31,15 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out
cp -r usr/* $out
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
--set-rpath ${stdenv.glibc.out}/lib:${fuse}/lib:${zlib}/lib:${glib}/lib \
$out/bin/appimagetool
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
--set-rpath ${zlib}/lib \
$out/bin/mksquashfs
'';
dontStrip = true;
dontPatchELF = true;
}