1{ stdenv, lib, fetchurl, muslPkgs, perl, pathsFromGraph, fetchFromGitHub, coreutils, bash }:
4 AppRun = targets: muslPkgs.stdenv.mkDerivation {
7 phases = [ "buildPhase" "installPhase" "fixupPhase" ];
10 CC="$CC -O2 -Wall -Wno-deprecated-declarations -Wno-unused-result -static"
11 $CC ${./AppRun.c} -o AppRun -DENV_PATH='"${lib.makeBinPath targets}"'
16 cp AppRun $out/bin/AppRun
22 { target, name, extraTargets ? [ coreutils bash ] }: let targets = ([ target ] ++ extraTargets);
23 in stdenv.mkDerivation {
24 name = "${name}.AppDir";
25 exportReferencesGraph = map (x: [("closure-" + baseNameOf x) x]) targets;
26 nativeBuildInputs = [ perl ];
28 # TODO use symlinks to shrink output size
30 if [ ! -d ${target}/share/applications ]; then
31 echo "--------------------------------------------------"
32 echo "| /share/applications does not exist. |"
33 echo "| AppImage only works with 'applications'. |"
34 echo "| Try using nix-bundle.sh for command-line apps. |"
35 echo "--------------------------------------------------"
39 storePaths=$(${perl}/bin/perl ${pathsFromGraph} ./closure-*)
41 mkdir -p $out/${name}.AppDir
42 cd $out/${name}.AppDir
45 cp -r $storePaths nix/store
49 if [ -d ${target}/share/appdata ]; then
51 mkdir -p usr/share/metainfo
52 for f in ${target}/share/appdata/*.xml; do
53 ln -s ../appdata/$(basename $f) usr/share/metainfo/$(basename $f)
58 desktop=$(find ${target}/share/applications -name "*.desktop" | head -n1)
59 if ! [ -z "$desktop" ]; then
65 if [ -d ${target}/share/icons ]; then
66 icon=$(find ${target}/share/icons -name "${name}*.png" | head -n1)
67 if ! [ -z "$icon" ]; then
71 icon=$(find ${target}/share/icons -name "${name}*.svg" | head -n1)
72 if ! [ -z "$icon" ]; then
79 cp ${AppRun targets}/bin/AppRun AppRun
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list