depot/third_party/nixpkgs/pkgs/applications/science/math/qalculate-qt/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

36 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, intltool, pkg-config, qmake, wrapQtAppsHook, libqalculate, qtbase, qttools, qtsvg, qtwayland }:
stdenv.mkDerivation rec {
pname = "qalculate-qt";
version = "4.7.0";
src = fetchFromGitHub {
owner = "qalculate";
repo = "qalculate-qt";
rev = "v${version}";
hash = "sha256-fMchJgxuOO2e7cOHLako26c9gsWvQY2MTRVD3JWGSAU=";
};
nativeBuildInputs = [ qmake intltool pkg-config qttools wrapQtAppsHook ];
buildInputs = [ libqalculate qtbase 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.unix;
};
}