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

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

79 lines
1.7 KiB
Nix
Raw Normal View History

2022-10-28 20:47:16 +00:00
{ lib
, stdenv
, fetchFromGitHub
, cmake
, gettext
, git
, makeWrapper
, lsb-release
, pkg-config
, wrapGAppsHook
, 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";
2023-02-28 10:52:35 +00:00
version = "1.6.3";
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;
2023-02-28 10:52:35 +00:00
hash = "sha256-TQgJ2Q4Z7+OtwuwkfPBgm2BmMKML9nmyFLSkmKJ1RE4=";
2022-03-15 10:26:51 +00:00
};
2022-10-28 20:47:16 +00:00
postPatch = lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) ''
substituteInPlace src/platfdep_mac.mm \
--replace "appearance.name == NSAppearanceNameDarkAqua" "NO"
2023-02-28 10:52:35 +00:00
'' + lib.optionalString (stdenv.isLinux && !stdenv.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 = [
2022-10-28 20:47:16 +00:00
cmake
gettext
git
makeWrapper
pkg-config
2022-03-15 10:26:51 +00:00
wrapGAppsHook
2022-10-28 20:47:16 +00:00
] ++ lib.optionals stdenv.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.isDarwin [
2023-02-28 10:52:35 +00:00
darwin.libobjc
2022-03-15 10:26:51 +00:00
];
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.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;
2022-10-28 20:47:16 +00:00
maintainers = with lib.maintainers; [ viric ];
platforms = with lib.platforms; unix;
mainProgram = "mmex";
2022-03-15 10:26:51 +00:00
};
}