2019-06-05 14:13:34 +00:00
|
|
|
{ stdenv, fetchFromGitHub, fetchurl
|
|
|
|
, gettext, poppler, qt5 , pkgconfig }:
|
2015-05-31 09:38:18 +00:00
|
|
|
|
2017-02-19 11:25:33 +00:00
|
|
|
# Warning: You will also need a working pdflatex installation containing
|
|
|
|
# at least auctex and pgf.
|
2015-05-31 09:38:18 +00: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 09:38:18 +00:00
|
|
|
|
2017-02-19 11:25:33 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-06-05 14:13:34 +00:00
|
|
|
version = "0.12";
|
2017-02-19 11:25:33 +00:00
|
|
|
name = "qtikz-${version}";
|
2015-05-31 09:38:18 +00:00
|
|
|
|
2017-02-19 11:25:33 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fhackenberger";
|
|
|
|
repo = "ktikz";
|
2019-06-05 14:13:34 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "1s83x8r2yi64wc6ah2iz09dj3qahy0fkxx6cfgpkavjw9x0j0582";
|
2017-02-19 11:25:33 +00:00
|
|
|
};
|
2015-05-31 09:38:18 +00:00
|
|
|
|
2019-06-05 14:13:34 +00:00
|
|
|
patches = [ (fetchurl {
|
|
|
|
url = "https://github.com/fhackenberger/ktikz/commit/972685a406517bb85eb561f2c8e26f029eacd7db.patch";
|
|
|
|
sha256 = "16jwsl18marfw5m888vwxdd1h7cqa37rkfqgirzdliacb1cr4f58";
|
|
|
|
})];
|
|
|
|
|
2017-02-19 11:25:33 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Editor for the TikZ language";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.layus ];
|
|
|
|
};
|
2015-05-31 09:38:18 +00:00
|
|
|
|
2017-02-19 11:25:33 +00:00
|
|
|
conf = ''
|
|
|
|
# installation prefix:
|
|
|
|
PREFIX = @out@
|
2015-05-31 09:38:18 +00:00
|
|
|
|
2017-02-19 11:25:33 +00:00
|
|
|
# install desktop file here (*nix only):
|
|
|
|
DESKTOP_INSTALL_DIR = @out@/share/applications
|
2015-05-31 09:38:18 +00:00
|
|
|
|
2017-02-19 11:25:33 +00:00
|
|
|
# install mimetype here:
|
|
|
|
MIME_INSTALL_DIR = @out@/share/mime/packages
|
2015-05-31 09:38:18 +00:00
|
|
|
|
2017-02-19 11:25:33 +00:00
|
|
|
# install doc here:
|
|
|
|
MAN_INSTALL_DIR = @out@/share/man
|
2015-05-31 09:38:18 +00:00
|
|
|
|
2017-02-19 11:25:33 +00:00
|
|
|
CONFIG -= debug
|
|
|
|
CONFIG += release
|
2015-05-31 09:38:18 +00:00
|
|
|
|
2017-02-19 11:25:33 +00:00
|
|
|
# qmake command:
|
|
|
|
QMAKECOMMAND = qmake
|
|
|
|
# lrelease command:
|
|
|
|
LRELEASECOMMAND = lrelease
|
|
|
|
# qcollectiongenerator command:
|
2019-03-27 21:35:21 +00:00
|
|
|
QCOLLECTIONGENERATORCOMMAND = qhelpgenerator
|
2015-05-31 09:38:18 +00:00
|
|
|
|
2017-02-19 11:25:33 +00:00
|
|
|
# TikZ documentation default file path:
|
|
|
|
TIKZ_DOCUMENTATION_DEFAULT = @out@/share/doc/texmf/pgf/pgfmanual.pdf.gz
|
|
|
|
'';
|
2015-05-31 09:38:18 +00:00
|
|
|
|
2017-02-19 11:25:33 +00:00
|
|
|
# 1. Configuration is done by overwriting qtikzconfig.pri
|
2019-06-05 14:13:34 +00:00
|
|
|
postPatch = ''
|
2017-02-19 11:25:33 +00:00
|
|
|
echo "$conf" | sed "s!@out@!$out!g" > qmake/qtikzconfig.pri
|
|
|
|
'';
|
2015-05-31 09:38:18 +00:00
|
|
|
|
2017-02-19 11:25:33 +00:00
|
|
|
configurePhase = ''
|
|
|
|
qmake PREFIX="$out" ./qtikz.pro
|
|
|
|
'';
|
2015-05-31 09:38:18 +00:00
|
|
|
|
2019-06-05 14:13:34 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig qt5.qttools ];
|
2018-07-17 20:11:16 +00:00
|
|
|
buildInputs = [ gettext qt5.full poppler ];
|
2015-05-31 09:38:18 +00:00
|
|
|
|
2017-02-19 11:25:33 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
}
|