biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / applications / science / math / qalculate-qt / default.nix
blob296fc5f783f3841fd5f4bf058007e95fd479ddff
1 { lib, stdenv, fetchFromGitHub, intltool, pkg-config, qmake, wrapQtAppsHook, libqalculate, qtbase, qttools, qtsvg, qtwayland }:
3 stdenv.mkDerivation (finalAttrs: {
4   pname = "qalculate-qt";
5   version = "5.0.0";
7   src = fetchFromGitHub {
8     owner = "qalculate";
9     repo = "qalculate-qt";
10     rev = "v${finalAttrs.version}";
11     hash = "sha256-X7IY2yXpZiyE+T2dl0G4tWpJ5O6MVCy/sOY3v9inma0=";
12   };
14   nativeBuildInputs = [ qmake intltool pkg-config qttools wrapQtAppsHook ];
15   buildInputs = [ libqalculate qtbase qtsvg ]
16     ++ lib.optionals stdenv.isLinux [ qtwayland ];
18   postPatch = ''
19     substituteInPlace qalculate-qt.pro\
20       --replace "LRELEASE" "${qttools.dev}/bin/lrelease"
21   '';
23   postInstall = lib.optionalString stdenv.isDarwin ''
24     mkdir -p $out/Applications
25     mv $out/bin/qalculate-qt.app $out/Applications
26     makeWrapper $out/{Applications/qalculate-qt.app/Contents/MacOS,bin}/qalculate-qt
27   '';
29   meta = with lib; {
30     description = "The ultimate desktop calculator";
31     homepage = "http://qalculate.github.io";
32     maintainers = with maintainers; [ _4825764518 ];
33     license = licenses.gpl2Plus;
34     mainProgram = "qalculate-qt";
35     platforms = platforms.unix;
36   };