2022-10-30 15:09:59 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, gettext
|
|
|
|
, git
|
|
|
|
, makeWrapper
|
|
|
|
, lsb-release
|
|
|
|
, pkg-config
|
|
|
|
, wrapGAppsHook
|
|
|
|
, curl
|
|
|
|
, sqlite
|
|
|
|
, wxGTK
|
|
|
|
, gtk3
|
|
|
|
, libobjc
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "money-manager-ex";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "1.6.1";
|
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;
|
2022-12-17 10:02:37 +00:00
|
|
|
sha256 = "sha256-0zUZBkdFLvc32gkGqu0pYlVsHuwjhaVZzu9acSmNfu8=";
|
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"
|
|
|
|
'';
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
nativeBuildInputs = [
|
2022-10-30 15:09:59 +00:00
|
|
|
cmake
|
|
|
|
gettext
|
|
|
|
git
|
|
|
|
makeWrapper
|
|
|
|
pkg-config
|
2022-03-30 09:31:56 +00:00
|
|
|
wrapGAppsHook
|
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
|
2022-10-30 15:09:59 +00:00
|
|
|
wxGTK
|
|
|
|
gtk3
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
libobjc
|
2022-03-30 09:31:56 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [
|
|
|
|
"-Wno-old-style-cast"
|
|
|
|
]);
|
|
|
|
|
|
|
|
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;
|
2022-10-30 15:09:59 +00:00
|
|
|
maintainers = with lib.maintainers; [ viric ];
|
|
|
|
platforms = with lib.platforms; unix;
|
|
|
|
mainProgram = "mmex";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
}
|