python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / applications / graphics / ktikz / default.nix
blobd176ce38f0adfdd6ffa3bd6b7d609b09c5f81ccd
1 { lib, stdenv, fetchFromGitHub, fetchpatch
2 , pkg-config, wrapQtAppsHook
3 , poppler, gnuplot
4 , qmake, qtbase, qttools
5 }:
7 # This package only builds ktikz without KDE integration because KDE4 is
8 # deprecated and upstream does not (yet ?) support KDE5.
9 # See historical versions of this file for building ktikz with KDE4.
11 stdenv.mkDerivation rec {
12   version = "0.12";
13   pname = "qtikz";
15   meta = with lib; {
16     description = "Editor for the TikZ language";
17     homepage = "https://github.com/fhackenberger/ktikz";
18     license = licenses.gpl2;
19     platforms = platforms.linux;
20     maintainers = [ maintainers.layus ];
21     longDescription = ''
22       You will also need a working *tex installation in your PATH, containing at least `preview` and `pgf`.
23     '';
24   };
26   src = fetchFromGitHub {
27     owner = "fhackenberger";
28     repo = "ktikz";
29     rev = version;
30     sha256 = "1s83x8r2yi64wc6ah2iz09dj3qahy0fkxx6cfgpkavjw9x0j0582";
31   };
33   patches = [
34     # Fix version in qtikz.pro
35     (fetchpatch {
36       url = "https://github.com/fhackenberger/ktikz/commit/972685a406517bb85eb561f2c8e26f029eacd7db.patch";
37       sha256 = "13z40rcd4m4n088v7z2ns17lnpn0z3rzp31lsamic3qdcwjwa5k8";
38     })
39     # Fix missing qt5.15 QPainterPath include
40     (fetchpatch {
41       url = "https://github.com/fhackenberger/ktikz/commit/ebe4dfb72ac8a137b475ef688b9f7ac3e5c7f242.patch";
42       sha256 = "GIgPh+iUBPftHKIpZR3a0FxmLhMLuPUapF/t+bCuqMs=";
43     })
44   ];
46   nativeBuildInputs = [ pkg-config qttools qmake wrapQtAppsHook ];
47   QT_PLUGIN_PATH = "${qtbase}/${qtbase.qtPluginPrefix}";
49   buildInputs = [ qtbase poppler ];
51   qmakeFlags = [
52     "DESKTOP_INSTALL_DIR=${placeholder "out"}/share/applications"
53     "MIME_INSTALL_DIR=${placeholder "out"}/share/mime/packages"
54     # qcollectiongenerator does no more exist in `qt5.qttools`.
55     # It was merged with qhelpgenerator at some point.
56     "QCOLLECTIONGENERATORCOMMAND=qhelpgenerator"
57   ];
59   qtWrapperArgs = [ ''--prefix PATH : "${gnuplot}/bin"'' ];