diff --git a/appdir.sh b/appdir.sh index e23b8ee..b445435 100755 --- a/appdir.sh +++ b/appdir.sh @@ -13,7 +13,7 @@ fi target="$1" -expr="with import {}; with import ./. {}; appdir { name = \"$target\"; target = $target; }" +expr="with import {}; with import ./appimage-top.nix {}; appdir { name = \"$target\"; target = $target; }" out=$(nix-store --no-gc-warning -r $(nix-instantiate --no-gc-warning -E "$expr")) diff --git a/appimage-top.nix b/appimage-top.nix new file mode 100644 index 0000000..a3ca0d8 --- /dev/null +++ b/appimage-top.nix @@ -0,0 +1,13 @@ +{nixpkgs ? import {}}: + +with nixpkgs; + +rec { + appimagetool = callPackage ./appimagetool.nix {}; + + appimage = callPackage ./appimage.nix { + inherit appimagetool; + }; + + appdir = callPackage ./appdir.nix {}; +} diff --git a/nix2appimage.sh b/nix2appimage.sh index fc86f75..cfa71ed 100755 --- a/nix2appimage.sh +++ b/nix2appimage.sh @@ -19,7 +19,7 @@ fi target="$1" -expr="with import {}; with import ./. {}; appimage (appdir { name = \"$target\"; target = $target; })" +expr="with import {}; with import ./appimage-top.nix {}; appimage (appdir { name = \"$target\"; target = $target; })" out=$(nix-store --no-gc-warning -r $(nix-instantiate --no-gc-warning -E "$expr"))