2022-10-30 15:09:59 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, gettext
|
|
|
|
, git
|
|
|
|
, makeWrapper
|
|
|
|
, lsb-release
|
|
|
|
, pkg-config
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
2022-10-30 15:09:59 +00:00
|
|
|
, curl
|
|
|
|
, sqlite
|
2023-03-04 12:14:45 +00:00
|
|
|
, wxGTK32
|
2022-10-30 15:09:59 +00:00
|
|
|
, gtk3
|
2023-03-04 12:14:45 +00:00
|
|
|
, darwin
|
2022-10-30 15:09:59 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "money-manager-ex";
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "1.6.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "moneymanagerex";
|
|
|
|
repo = "moneymanagerex";
|
2022-10-30 15:09:59 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
fetchSubmodules = true;
|
2023-03-04 12:14:45 +00:00
|
|
|
hash = "sha256-TQgJ2Q4Z7+OtwuwkfPBgm2BmMKML9nmyFLSkmKJ1RE4=";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
postPatch = lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) ''
|
|
|
|
substituteInPlace src/platfdep_mac.mm \
|
|
|
|
--replace "appearance.name == NSAppearanceNameDarkAqua" "NO"
|
2023-03-04 12:14:45 +00:00
|
|
|
'' + lib.optionalString (stdenv.isLinux && !stdenv.isx86_64) ''
|
|
|
|
substituteInPlace 3rd/CMakeLists.txt \
|
|
|
|
--replace "-msse4.2 -maes" ""
|
2022-10-30 15:09:59 +00:00
|
|
|
'';
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
nativeBuildInputs = [
|
2022-10-30 15:09:59 +00:00
|
|
|
cmake
|
|
|
|
gettext
|
|
|
|
git
|
|
|
|
makeWrapper
|
|
|
|
pkg-config
|
2024-05-15 15:35:15 +00:00
|
|
|
wrapGAppsHook3
|
2022-10-30 15:09:59 +00:00
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
lsb-release
|
2022-03-30 09:31:56 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
buildInputs = [
|
2022-10-30 15:09:59 +00:00
|
|
|
curl
|
2022-03-30 09:31:56 +00:00
|
|
|
sqlite
|
2023-03-04 12:14:45 +00:00
|
|
|
wxGTK32
|
2022-10-30 15:09:59 +00:00
|
|
|
gtk3
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2023-03-04 12:14:45 +00:00
|
|
|
darwin.libobjc
|
2022-03-30 09:31:56 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [
|
|
|
|
"-Wno-deprecated-copy"
|
2022-10-30 15:09:59 +00:00
|
|
|
"-Wno-old-style-cast"
|
2023-03-04 12:14:45 +00:00
|
|
|
"-Wno-unused-parameter"
|
2022-10-30 15:09:59 +00:00
|
|
|
]);
|
|
|
|
|
|
|
|
postInstall = lib.optionalString stdenv.isDarwin ''
|
|
|
|
mkdir -p $out/{Applications,bin}
|
|
|
|
mv $out/mmex.app $out/Applications
|
|
|
|
makeWrapper $out/{Applications/mmex.app/Contents/MacOS,bin}/mmex
|
|
|
|
'';
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
meta = {
|
|
|
|
description = "Easy-to-use personal finance software";
|
|
|
|
homepage = "https://www.moneymanagerex.org/";
|
|
|
|
license = lib.licenses.gpl2Plus;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2022-10-30 15:09:59 +00:00
|
|
|
platforms = with lib.platforms; unix;
|
|
|
|
mainProgram = "mmex";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
}
|