nixpkgs/pkgs/applications/science/math/qalculate-qt/default.nix

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

37 lines
1.1 KiB
Nix
Raw Normal View History

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