about summary refs log tree commit diff
path: root/pkgs/applications/office/mmex/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/office/mmex/default.nix')
-rw-r--r--pkgs/applications/office/mmex/default.nix28
1 files changed, 21 insertions, 7 deletions
diff --git a/pkgs/applications/office/mmex/default.nix b/pkgs/applications/office/mmex/default.nix
index 14f3c4098102..53cc19e5f1d3 100644
--- a/pkgs/applications/office/mmex/default.nix
+++ b/pkgs/applications/office/mmex/default.nix
@@ -1,7 +1,9 @@
 { lib
 , stdenv
 , fetchFromGitHub
+, appstream
 , cmake
+, fetchpatch
 , gettext
 , git
 , makeWrapper
@@ -17,32 +19,42 @@
 
 stdenv.mkDerivation rec {
   pname = "money-manager-ex";
-  version = "1.6.3";
+  version = "1.8.0";
 
   src = fetchFromGitHub {
     owner = "moneymanagerex";
     repo = "moneymanagerex";
     rev = "v${version}";
     fetchSubmodules = true;
-    hash = "sha256-TQgJ2Q4Z7+OtwuwkfPBgm2BmMKML9nmyFLSkmKJ1RE4=";
+    hash = "sha256-jV1jW0aFx95JpwzywEVajstnMKVcEtBdvyL7y6OLl+k=";
   };
 
-  postPatch = lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) ''
+  patches = [
+    (fetchpatch { # https://github.com/moneymanagerex/moneymanagerex/pull/6716
+      name = "workaround-appstream-1.0.3.patch";
+      url = "https://github.com/moneymanagerex/moneymanagerex/commit/bb98eab92d95b7315d27f4e59ae59b50587106d8.patch";
+      hash = "sha256-98OyFO2nnGBRTIirxZ3jX1NPvsw5kVT8nsCSSmyfabo=";
+    })
+  ];
+
+  postPatch = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) ''
     substituteInPlace src/platfdep_mac.mm \
       --replace "appearance.name == NSAppearanceNameDarkAqua" "NO"
-  '' + lib.optionalString (stdenv.isLinux && !stdenv.isx86_64) ''
+  '' + lib.optionalString (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isx86_64) ''
     substituteInPlace 3rd/CMakeLists.txt \
       --replace "-msse4.2 -maes" ""
   '';
 
   nativeBuildInputs = [
+    appstream # for appstreamcli
     cmake
     gettext
     git
     makeWrapper
     pkg-config
     wrapGAppsHook3
-  ] ++ lib.optionals stdenv.isLinux [
+    wxGTK32
+  ] ++ lib.optionals stdenv.hostPlatform.isLinux [
     lsb-release
   ];
 
@@ -51,17 +63,19 @@ stdenv.mkDerivation rec {
     sqlite
     wxGTK32
     gtk3
-  ] ++ lib.optionals stdenv.isDarwin [
+  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
     darwin.libobjc
   ];
 
+  strictDeps = true;
+
   env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [
     "-Wno-deprecated-copy"
     "-Wno-old-style-cast"
     "-Wno-unused-parameter"
   ]);
 
-  postInstall = lib.optionalString stdenv.isDarwin ''
+  postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
     mkdir -p $out/{Applications,bin}
     mv $out/mmex.app $out/Applications
     makeWrapper $out/{Applications/mmex.app/Contents/MacOS,bin}/mmex