on master help sign in
Add simple helper for testing AppImage exec on NixOS
commitcb424030eb218b34f2bd4ee3655d1a7afa98dd3c authorWill Dietz <w@wdtz.org> dateMon 26 Feb 2018, 13:03 (9 years ago) parentf964279
1 file changed+14
test-appimage.nix+14
test-appimage.nixnew file+14
@@ -0,0 +1,14 @@
1+{ appimagefile, nixpkgs' ? <nixpkgs> }:
2+
3+# nix build -f test-appimage.nix --arg appimagefile ./VLC*AppImage
4+
5+with import nixpkgs' {};
6+
7+runCommand "patchelf" {} ''
8+ cp ${appimagefile} $out
9+ chmod +w $out
10+ patchelf \
11+ --set-interpreter ${stdenv.cc.bintools.dynamicLinker} \
12+ --set-rpath ${stdenv.glibc.out}/lib:${fuse}/lib:${zlib}/lib:${glib}/lib \
13+ $out
14+''