jameica: ensure gsetting schema is available

This commit is contained in:
Shawn8901 2022-07-30 16:10:06 +02:00
parent b2f73f120a
commit 7d933d4c34

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, makeDesktopItem, makeWrapper, ant, jdk, jre, gtk2, glib, xorg, Cocoa }:
{ lib, stdenv, fetchFromGitHub, makeDesktopItem, makeWrapper, wrapGAppsHook, ant, jdk, jre, gtk2, glib, xorg, Cocoa }:
let
_version = "2.10.2";
@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
pname = "jameica";
inherit version;
nativeBuildInputs = [ ant jdk makeWrapper ];
nativeBuildInputs = [ ant jdk wrapGAppsHook makeWrapper ];
buildInputs = lib.optionals stdenv.isLinux [ gtk2 glib xorg.libXtst ]
++ lib.optional stdenv.isDarwin Cocoa;
@ -35,6 +35,8 @@ stdenv.mkDerivation rec {
sha256 = "1x9sybknzsfxp9z0pvw9dx80732ynyap57y03p7xwwjbcrnjla57";
};
dontWrapGApps = true;
# there is also a build.gradle, but it only seems to be used to vendor 3rd party libraries
# and is not able to build the application itself
buildPhase = ''
@ -53,13 +55,16 @@ stdenv.mkDerivation rec {
install -Dm644 plugin.xml $out/share/java/
install -Dm644 build/jameica-icon.png $out/share/pixmaps/jameica.png
cp ${desktopItem}/share/applications/* $out/share/applications/
'';
postFixup = ''
makeWrapper ${jre}/bin/java $out/bin/jameica \
--add-flags "-cp $out/share/java/jameica.jar:$out/share/jameica-${version}/* ${
lib.optionalString stdenv.isDarwin ''-Xdock:name="Jameica" -XstartOnFirstThread''
} de.willuhn.jameica.Main" \
--prefix LD_LIBRARY_PATH : ${lib.escapeShellArg (lib.makeLibraryPath buildInputs)} \
--chdir "$out/share/java/"
--chdir "$out/share/java/" \
"''${gappsWrapperArgs[@]}"
'';
meta = with lib; {
@ -71,7 +76,7 @@ stdenv.mkDerivation rec {
'';
sourceProvenance = with sourceTypes; [
fromSource
binaryBytecode # source bundles dependencies as jars
binaryBytecode # source bundles dependencies as jars
];
license = licenses.gpl2Plus;
platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];