From cf5826f1a3179eac79acf3734b9404d8e7a42a5c Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 13 Aug 2018 14:12:29 +0200 Subject: [PATCH] jameica: add darwin support (#44953) --- pkgs/applications/office/jameica/default.nix | 10 ++++++---- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/office/jameica/default.nix b/pkgs/applications/office/jameica/default.nix index 5b65c11cb9f7..7b804151d4a7 100644 --- a/pkgs/applications/office/jameica/default.nix +++ b/pkgs/applications/office/jameica/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, makeDesktopItem, makeWrapper, ant, jdk, jre, xmlstarlet, gtk2, glib, xorg }: +{ stdenv, fetchFromGitHub, makeDesktopItem, makeWrapper, ant, jdk, jre, xmlstarlet, gtk2, glib, xorg, Cocoa }: let _version = "2.8.1"; @@ -8,11 +8,12 @@ let swtSystem = if stdenv.system == "i686-linux" then "linux" else if stdenv.system == "x86_64-linux" then "linux64" + else if stdenv.system == "x86_64-darwin" then "macos64" else throw "Unsupported system: ${stdenv.system}"; launcher = '' #!${stdenv.shell} - exec ${jre}/bin/java -Xmx512m de.willuhn.jameica.Main "$@" + exec ${jre}/bin/java -Xmx512m ${ stdenv.lib.optionalString stdenv.isDarwin ''-Xdock:name="Jameica" -XstartOnFirstThread''} de.willuhn.jameica.Main "$@" ''; desktopItem = makeDesktopItem { @@ -28,7 +29,8 @@ stdenv.mkDerivation rec { inherit name version; nativeBuildInputs = [ ant jdk makeWrapper xmlstarlet ]; - buildInputs = [ gtk2 glib xorg.libXtst ]; + buildInputs = stdenv.lib.optionals stdenv.isLinux [ gtk2 glib xorg.libXtst ] + ++ stdenv.lib.optional stdenv.isDarwin Cocoa; src = fetchFromGitHub { owner = "willuhn"; @@ -82,7 +84,7 @@ stdenv.mkDerivation rec { SynTAX (accounting) and JVerein (club management). ''; license = licenses.gpl2Plus; - platforms = [ "x86_64-linux" "i686-linux" ]; + platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ]; maintainers = with maintainers; [ flokli ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ae8b67081225..74af33761c34 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16881,7 +16881,9 @@ with pkgs; jalv = callPackage ../applications/audio/jalv { }; - jameica = callPackage ../applications/office/jameica { }; + jameica = callPackage ../applications/office/jameica { + inherit (darwin.apple_sdk.frameworks) Cocoa; + }; jamin = callPackage ../applications/audio/jamin { };