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
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2022-09-09 14:08:57 +00:00
|
|
|
pname = "qalculate-qt";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "5.1.0";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "qalculate";
|
|
|
|
repo = "qalculate-qt";
|
2023-10-09 19:29:22 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-gJfIC5HdA10gb/Dh/yhJbkCZfhUnN0zihqyfDjPv6ow=";
|
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; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Ultimate desktop calculator";
|
2022-09-09 14:08:57 +00:00
|
|
|
homepage = "http://qalculate.github.io";
|
|
|
|
maintainers = with maintainers; [ _4825764518 ];
|
|
|
|
license = licenses.gpl2Plus;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "qalculate-qt";
|
2023-03-24 00:07:29 +00:00
|
|
|
platforms = platforms.unix;
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
2023-10-09 19:29:22 +00:00
|
|
|
})
|