2023-01-11 07:51:40 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, intltool, pkg-config, qmake, wrapQtAppsHook, libqalculate, qtbase, qttools, qtsvg, qtwayland }:
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "qalculate-qt";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "4.7.0";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "qalculate";
|
|
|
|
repo = "qalculate-qt";
|
|
|
|
rev = "v${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-fMchJgxuOO2e7cOHLako26c9gsWvQY2MTRVD3JWGSAU=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeBuildInputs = [ qmake intltool pkg-config qttools wrapQtAppsHook ];
|
|
|
|
buildInputs = [ libqalculate qtbase qtsvg ]
|
2023-03-24 00:07:29 +00:00
|
|
|
++ lib.optionals stdenv.isLinux [ qtwayland ];
|
2023-01-11 07:51:40 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace qalculate-qt.pro\
|
|
|
|
--replace "LRELEASE" "${qttools.dev}/bin/lrelease"
|
|
|
|
'';
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "The ultimate desktop calculator";
|
|
|
|
homepage = "http://qalculate.github.io";
|
|
|
|
maintainers = with maintainers; [ _4825764518 ];
|
|
|
|
license = licenses.gpl2Plus;
|
2023-03-24 00:07:29 +00:00
|
|
|
platforms = platforms.unix;
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
}
|