From 7d933d4c347ea7d0ca2763a689c3437709eede09 Mon Sep 17 00:00:00 2001 From: Shawn8901 Date: Sat, 30 Jul 2022 16:10:06 +0200 Subject: [PATCH] jameica: ensure gsetting schema is available --- pkgs/applications/office/jameica/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/office/jameica/default.nix b/pkgs/applications/office/jameica/default.nix index 55e24d80f277..d4a3028b8943 100644 --- a/pkgs/applications/office/jameica/default.nix +++ b/pkgs/applications/office/jameica/default.nix @@ -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" ];