2017-02-08 13:29:43 +03:00
|
|
|
{ stdenv, fetchurl, fuse, zlib }:
|
2017-02-07 01:17:20 +03:00
|
|
|
|
|
|
|
# This is from some binaries.
|
|
|
|
|
|
|
|
# Ideally, this should be source based,
|
|
|
|
# but I can't get it to build from GitHub
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "appimagekit";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2017-02-12 23:54:23 +03:00
|
|
|
url = "https://github.com/probonopd/AppImageKit/releases/download/7/appimagetool-x86_64.AppImage";
|
|
|
|
sha256 = "1irvbf0xnya16cyzpvr43jviq5ly3wl7b9753rji7d1hhxwb7b9r";
|
2017-02-07 01:17:20 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = "squashfs-root";
|
|
|
|
|
|
|
|
unpackPhase = ''
|
2017-02-08 13:29:43 +03:00
|
|
|
cp $src appimagetool-x86_64.AppImage
|
|
|
|
chmod u+wx appimagetool-x86_64.AppImage
|
|
|
|
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
|
|
|
--set-rpath ${fuse}/lib:${zlib}/lib \
|
|
|
|
appimagetool-x86_64.AppImage
|
|
|
|
./appimagetool-x86_64.AppImage --appimage-extract
|
2017-02-07 01:17:20 +03:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -r usr/* $out
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontPatchELF = true;
|
|
|
|
}
|