Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wip] appimageTools: add a new buildAppImage wrapper #82158

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions pkgs/applications/networking/browsers/beakerbrowser/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{ buildAppImage, fetchurl, stdenv }:

buildAppImage rec {
pname = "beakerbrowser";
version = "0.8.8";
src = fetchurl {
url = "https://github.com/beakerbrowser/beaker/releases/download/${version}/Beaker.Browser.${version}.AppImage";
sha256 = "a190f1ca3266b2cb62a76b5a957a3e42b14726ca2732a2797c6fce40aaead695";
};
meta = {
description = "Experimental peer-to-peer Web browser";
license = stdenv.lib.licenses.mit;
maintainers = with stdenv.lib.maintainers; [ genesis ];
};
}
49 changes: 49 additions & 0 deletions pkgs/build-support/appimage/build-appimage.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{ appimageTools, autoPatchelfHook, stdenv, desktop-file-utils
, hicolor-icon-theme,gtk3, gsettings-desktop-schemas }:

# fetchzip is for compatibility, bother AppImage builder about that :
# https://docs.appimage.org/packaging-guide/distribution.html#do-not-put-appimages-into-other-archives

# some src.url can be hard to follow, you can download them with firefox
# "simple mass downloader" addon then use the "export selected item to file"
# available in the right menu.

{
pname,
version,
src,
meta,
...
} @attrs:
let
name = "${attrs.pname}-${attrs.version}.AppImage";
attrs' = builtins.removeAttrs attrs ["version" "pname"];
#nativeBuildInputs = [ ];

#appimageTools
in appimageTools.wrapType2 (attrs' // {
inherit name src;
/* extraPkgs = ps:
appimageTools.defaultFhsEnvArgs.multiPkgs ps
++ (with ps; [ desktop-file-utils autoPatchelfHook ]); */

/* buildInputs = [ desktop-file-utils autoPatchelfHook ]; */
/* extraBuildCommands = */
/* extraInstallCommands = attrs.extraInstallCommands or ''
# fixup and install desktop file
desktopitem="$(ls $out/*.desktop)"
desktop-file-install "$desktopitem" --dir $out/share/applications \
--set-key Exec --set-value $out/bin/${name}
mv $out/share/applications/"$desktopitem" $out/share/applications/$name.desktop

#PLANNED: write a more generic code to read icon path from $desktopitem
#install -m 444 -D $icon $out/share/icons/hicolor/512x512/apps/$icon
''; */

meta = {
license = stdenv.lib.licenses.unfree;
platforms = [ "x86_64-linux" ];
description = throw "please write meta.description";
maintainers = throw "please write meta.maintainers";
} // attrs'.meta;
} // attrs')
15 changes: 15 additions & 0 deletions pkgs/games/colobot/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{ buildAppImage, fetchurl, stdenv }:

buildAppImage rec {
pname = "colobot";
version = "0.1.12-alpha";
src = fetchurl {
url = "https://colobot.info/files/releases/0.1.12-alpha/Colobot-${version}-x86_64.AppImage";
sha256 = "da1b5b3ac8a072d1999c2ac8c65a6c1e0aad3c1a97e5dfd72c9a8c7f30c60fa5";
};
meta = {
description = "RTS game, where you can program your units (bots) in a language called CBOT";
license = stdenv.lib.licenses.gpl3;
maintainers = with stdenv.lib.maintainers; [ genesis ];
};
}
10 changes: 9 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ in

appimageTools = callPackage ../build-support/appimage { };

appimagePackages = recurseIntoAttrs (callPackage ./appimage-packages.nix { });

ensureNewerSourcesHook = { year }: makeSetupHook {}
(writeScript "ensure-newer-sources-hook.sh" ''
postUnpackHooks+=(_ensureNewerSources)
Expand All @@ -141,6 +143,8 @@ in
deps = [ innoextract file-rename ]; }
../build-support/setup-hooks/gog-unpack.sh;

buildAppImage = callPackage ../build-support/appimage/build-appimage.nix { };

buildEnv = callPackage ../build-support/buildenv { }; # not actually a package

buildFHSUserEnv = callPackage ../build-support/build-fhs-userenv { };
Expand Down Expand Up @@ -2465,6 +2469,8 @@ in
nodejs = nodejs-10_x;
};

colobot = callPackage ../games/colobot {};

colord = callPackage ../tools/misc/colord { };

colord-gtk = callPackage ../tools/misc/colord-gtk { };
Expand Down Expand Up @@ -3492,7 +3498,7 @@ in
fuse-7z-ng = callPackage ../tools/filesystems/fuse-7z-ng { };

fuse-overlayfs = callPackage ../tools/filesystems/fuse-overlayfs {};

fusee-interfacee-tk = callPackage ../applications/misc/fusee-interfacee-tk { };

fusee-launcher = callPackage ../development/tools/fusee-launcher { };
Expand Down Expand Up @@ -9820,6 +9826,8 @@ in

buildBazelPackage = callPackage ../build-support/build-bazel-package { };

beakerbrowser = callPackage ../applications/networking/browsers/beakerbrowser { };

bear = callPackage ../development/tools/build-managers/bear { };

bin_replace_string = callPackage ../development/tools/misc/bin_replace_string { };
Expand Down