qalculate-qt: add darwin support

This commit is contained in:
Weijia Wang 2023-03-16 21:31:51 +02:00
parent a8fa8c2e90
commit 5c214fb163

View File

@ -12,18 +12,25 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ qmake intltool pkg-config wrapQtAppsHook ];
buildInputs = [ libqalculate qtbase qttools qtsvg qtwayland ];
buildInputs = [ libqalculate qtbase qttools qtsvg ]
++ lib.optionals stdenv.isLinux [ qtwayland ];
postPatch = ''
substituteInPlace qalculate-qt.pro\
--replace "LRELEASE" "${qttools.dev}/bin/lrelease"
'';
postInstall = lib.optionalString stdenv.isDarwin ''
mkdir -p $out/Applications
mv $out/bin/qalculate-qt.app $out/Applications
makeWrapper $out/{Applications/qalculate-qt.app/Contents/MacOS,bin}/qalculate-qt
'';
meta = with lib; {
description = "The ultimate desktop calculator";
homepage = "http://qalculate.github.io";
maintainers = with maintainers; [ _4825764518 ];
license = licenses.gpl2Plus;
platforms = platforms.linux;
platforms = platforms.unix;
};
}