98eb3e9ef5
GitOrigin-RevId: 00d80d13810dbfea8ab4ed1009b09100cca86ba8
37 lines
1.2 KiB
Nix
37 lines
1.2 KiB
Nix
{ lib, stdenv, fetchFromGitHub, intltool, pkg-config, qmake, wrapQtAppsHook, libqalculate, qtbase, qttools, qtsvg, qtwayland }:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "qalculate-qt";
|
|
version = "5.2.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "qalculate";
|
|
repo = "qalculate-qt";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-jlzuLLEFi72ElVBJSRikrMMaHIVWKRUAWGyeqzuj7xw=";
|
|
};
|
|
|
|
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 = "Ultimate desktop calculator";
|
|
homepage = "http://qalculate.github.io";
|
|
maintainers = with maintainers; [ _4825764518 ];
|
|
license = licenses.gpl2Plus;
|
|
mainProgram = "qalculate-qt";
|
|
platforms = platforms.unix;
|
|
};
|
|
})
|