nixpkgs/pkgs/applications/office/mmex/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

93 lines
2.2 KiB
Nix
Raw Normal View History

2022-10-28 20:47:16 +00:00
{ lib
, stdenv
, fetchFromGitHub
2024-10-19 09:49:24 +00:00
, appstream
2022-10-28 20:47:16 +00:00
, cmake
2024-10-19 09:49:24 +00:00
, fetchpatch
2022-10-28 20:47:16 +00:00
, gettext
, git
, makeWrapper
, lsb-release
, pkg-config
, wrapGAppsHook3
2022-10-28 20:47:16 +00:00
, curl
, sqlite
2023-02-28 10:52:35 +00:00
, wxGTK32
2022-10-28 20:47:16 +00:00
, gtk3
2023-02-28 10:52:35 +00:00
, darwin
2022-10-28 20:47:16 +00:00
}:
2022-03-15 10:26:51 +00:00
stdenv.mkDerivation rec {
pname = "money-manager-ex";
2024-10-19 09:49:24 +00:00
version = "1.8.0";
2022-03-15 10:26:51 +00:00
src = fetchFromGitHub {
owner = "moneymanagerex";
repo = "moneymanagerex";
2022-10-28 20:47:16 +00:00
rev = "v${version}";
fetchSubmodules = true;
2024-10-19 09:49:24 +00:00
hash = "sha256-jV1jW0aFx95JpwzywEVajstnMKVcEtBdvyL7y6OLl+k=";
2022-03-15 10:26:51 +00:00
};
2024-10-19 09:49:24 +00:00
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=";
})
];
2022-10-28 20:47:16 +00:00
postPatch = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) ''
substituteInPlace src/platfdep_mac.mm \
--replace "appearance.name == NSAppearanceNameDarkAqua" "NO"
2023-02-28 10:52:35 +00:00
'' + lib.optionalString (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isx86_64) ''
substituteInPlace 3rd/CMakeLists.txt \
--replace "-msse4.2 -maes" ""
2022-10-28 20:47:16 +00:00
'';
2022-03-15 10:26:51 +00:00
nativeBuildInputs = [
2024-10-19 09:49:24 +00:00
appstream # for appstreamcli
2022-10-28 20:47:16 +00:00
cmake
gettext
git
makeWrapper
pkg-config
wrapGAppsHook3
2024-10-19 09:49:24 +00:00
wxGTK32
2022-10-28 20:47:16 +00:00
] ++ lib.optionals stdenv.hostPlatform.isLinux [
lsb-release
2022-03-15 10:26:51 +00:00
];
2019-12-05 11:48:57 +00:00
2022-03-15 10:26:51 +00:00
buildInputs = [
2022-10-28 20:47:16 +00:00
curl
2022-03-15 10:26:51 +00:00
sqlite
2023-02-28 10:52:35 +00:00
wxGTK32
2022-10-28 20:47:16 +00:00
gtk3
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
2023-02-28 10:52:35 +00:00
darwin.libobjc
2022-03-15 10:26:51 +00:00
];
2024-10-19 09:49:24 +00:00
strictDeps = true;
env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [
2023-02-28 10:52:35 +00:00
"-Wno-deprecated-copy"
2022-10-28 20:47:16 +00:00
"-Wno-old-style-cast"
2023-02-28 10:52:35 +00:00
"-Wno-unused-parameter"
2022-10-28 20:47:16 +00:00
]);
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
'';
2022-03-15 10:26:51 +00:00
meta = {
description = "Easy-to-use personal finance software";
homepage = "https://www.moneymanagerex.org/";
license = lib.licenses.gpl2Plus;
maintainers = [ ];
2022-10-28 20:47:16 +00:00
platforms = with lib.platforms; unix;
mainProgram = "mmex";
2022-03-15 10:26:51 +00:00
};
}