2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config, wrapQtAppsHook
|
2020-09-07 16:37:48 +01:00
|
|
|
, poppler, gnuplot
|
|
|
|
, qmake, qtbase, qttools
|
2019-06-05 22:20:44 +01:00
|
|
|
}:
|
2015-05-31 10:38:18 +01:00
|
|
|
|
2017-02-19 11:25:33 +00:00
|
|
|
# This package only builds ktikz without KDE integration because KDE4 is
|
|
|
|
# deprecated and upstream does not (yet ?) support KDE5.
|
|
|
|
# See historical versions of this file for building ktikz with KDE4.
|
2015-05-31 10:38:18 +01:00
|
|
|
|
2017-02-19 11:25:33 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-06-05 15:13:34 +01:00
|
|
|
version = "0.12";
|
2019-06-05 22:20:44 +01:00
|
|
|
pname = "qtikz";
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-06-05 22:20:44 +01:00
|
|
|
description = "Editor for the TikZ language";
|
|
|
|
homepage = "https://github.com/fhackenberger/ktikz";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.layus ];
|
2019-06-06 07:53:18 +01:00
|
|
|
longDescription = ''
|
2019-06-05 22:20:44 +01:00
|
|
|
You will also need a working *tex installation in your PATH, containing at least `preview` and `pgf`.
|
|
|
|
'';
|
|
|
|
};
|
2015-05-31 10:38:18 +01:00
|
|
|
|
2017-02-19 11:25:33 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fhackenberger";
|
|
|
|
repo = "ktikz";
|
2019-06-05 15:13:34 +01:00
|
|
|
rev = version;
|
|
|
|
sha256 = "1s83x8r2yi64wc6ah2iz09dj3qahy0fkxx6cfgpkavjw9x0j0582";
|
2017-02-19 11:25:33 +00:00
|
|
|
};
|
2015-05-31 10:38:18 +01:00
|
|
|
|
2019-06-06 07:55:02 +01:00
|
|
|
patches = [
|
2020-11-21 09:29:19 +00:00
|
|
|
# Fix version in qtikz.pro
|
2019-06-06 07:55:02 +01:00
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/fhackenberger/ktikz/commit/972685a406517bb85eb561f2c8e26f029eacd7db.patch";
|
2019-06-06 10:51:21 +01:00
|
|
|
sha256 = "13z40rcd4m4n088v7z2ns17lnpn0z3rzp31lsamic3qdcwjwa5k8";
|
2019-06-06 07:55:02 +01:00
|
|
|
})
|
2020-11-21 09:29:19 +00:00
|
|
|
# Fix missing qt5.15 QPainterPath include
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/fhackenberger/ktikz/commit/ebe4dfb72ac8a137b475ef688b9f7ac3e5c7f242.patch";
|
|
|
|
sha256 = "GIgPh+iUBPftHKIpZR3a0FxmLhMLuPUapF/t+bCuqMs=";
|
|
|
|
})
|
2019-06-06 07:55:02 +01:00
|
|
|
];
|
2019-06-05 15:13:34 +01:00
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config qttools qmake wrapQtAppsHook ];
|
2020-09-07 16:37:48 +01:00
|
|
|
QT_PLUGIN_PATH = "${qtbase}/${qtbase.qtPluginPrefix}";
|
2015-05-31 10:38:18 +01:00
|
|
|
|
2020-09-07 16:37:48 +01:00
|
|
|
buildInputs = [ qtbase poppler ];
|
2019-06-05 22:20:44 +01:00
|
|
|
enableParallelBuilding = true;
|
2015-05-31 10:38:18 +01:00
|
|
|
|
2019-06-05 22:20:44 +01:00
|
|
|
qmakeFlags = [
|
|
|
|
"DESKTOP_INSTALL_DIR=${placeholder "out"}/share/applications"
|
|
|
|
"MIME_INSTALL_DIR=${placeholder "out"}/share/mime/packages"
|
|
|
|
# qcollectiongenerator does no more exist in `qt5.qttools`.
|
|
|
|
# It was merged with qhelpgenerator at some point.
|
|
|
|
"QCOLLECTIONGENERATORCOMMAND=qhelpgenerator"
|
|
|
|
];
|
|
|
|
|
2019-07-05 16:42:08 +01:00
|
|
|
qtWrapperArgs = [ ''--prefix PATH : "${gnuplot}/bin"'' ];
|
2017-02-19 11:25:33 +00:00
|
|
|
}
|