18 stdenv.mkDerivation rec {
19 pname = "money-manager-ex";
22 src = fetchFromGitHub {
23 owner = "moneymanagerex";
24 repo = "moneymanagerex";
26 fetchSubmodules = true;
27 hash = "sha256-TQgJ2Q4Z7+OtwuwkfPBgm2BmMKML9nmyFLSkmKJ1RE4=";
30 postPatch = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) ''
31 substituteInPlace src/platfdep_mac.mm \
32 --replace "appearance.name == NSAppearanceNameDarkAqua" "NO"
33 '' + lib.optionalString (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isx86_64) ''
34 substituteInPlace 3rd/CMakeLists.txt \
35 --replace "-msse4.2 -maes" ""
45 ] ++ lib.optionals stdenv.hostPlatform.isLinux [
54 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
58 env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [
59 "-Wno-deprecated-copy"
61 "-Wno-unused-parameter"
64 postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
65 mkdir -p $out/{Applications,bin}
66 mv $out/mmex.app $out/Applications
67 makeWrapper $out/{Applications/mmex.app/Contents/MacOS,bin}/mmex
71 description = "Easy-to-use personal finance software";
72 homepage = "https://www.moneymanagerex.org/";
73 license = lib.licenses.gpl2Plus;
75 platforms = with lib.platforms; unix;