20 stdenv.mkDerivation rec {
21 pname = "money-manager-ex";
24 src = fetchFromGitHub {
25 owner = "moneymanagerex";
26 repo = "moneymanagerex";
28 fetchSubmodules = true;
29 hash = "sha256-jV1jW0aFx95JpwzywEVajstnMKVcEtBdvyL7y6OLl+k=";
33 (fetchpatch { # https://github.com/moneymanagerex/moneymanagerex/pull/6716
34 name = "workaround-appstream-1.0.3.patch";
35 url = "https://github.com/moneymanagerex/moneymanagerex/commit/bb98eab92d95b7315d27f4e59ae59b50587106d8.patch";
36 hash = "sha256-98OyFO2nnGBRTIirxZ3jX1NPvsw5kVT8nsCSSmyfabo=";
40 postPatch = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) ''
41 substituteInPlace src/platfdep_mac.mm \
42 --replace "appearance.name == NSAppearanceNameDarkAqua" "NO"
43 '' + lib.optionalString (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isx86_64) ''
44 substituteInPlace 3rd/CMakeLists.txt \
45 --replace "-msse4.2 -maes" ""
49 appstream # for appstreamcli
57 ] ++ lib.optionals stdenv.hostPlatform.isLinux [
66 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
72 env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [
73 "-Wno-deprecated-copy"
75 "-Wno-unused-parameter"
78 postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
79 mkdir -p $out/{Applications,bin}
80 mv $out/mmex.app $out/Applications
81 makeWrapper $out/{Applications/mmex.app/Contents/MacOS,bin}/mmex
85 description = "Easy-to-use personal finance software";
86 homepage = "https://www.moneymanagerex.org/";
87 license = lib.licenses.gpl2Plus;
89 platforms = with lib.platforms; unix;