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

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

74 lines
1.5 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
, wxGTK
, gtk3
, libobjc
}:
2022-03-15 10:26:51 +00:00
stdenv.mkDerivation rec {
pname = "money-manager-ex";
2022-11-19 12:29:47 +00:00
version = "1.6.1";
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;
2022-11-19 12:29:47 +00:00
sha256 = "sha256-0zUZBkdFLvc32gkGqu0pYlVsHuwjhaVZzu9acSmNfu8=";
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"
'';
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
2022-10-28 20:47:16 +00:00
wxGTK
gtk3
] ++ lib.optionals stdenv.isDarwin [
libobjc
2022-03-15 10:26:51 +00:00
];
2022-10-28 20:47:16 +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-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
};
}