diff options
author | Guillaume Maudoux <layus.on@gmail.com> | 2017-02-19 12:25:33 +0100 |
---|---|---|
committer | Guillaume Maudoux <layus.on@gmail.com> | 2017-02-19 12:26:51 +0100 |
commit | 9016be45891fba34f4a29979ec0526d95be17933 (patch) | |
tree | 14115515a433d117bde1ba554601661161a3e5af /pkgs/applications | |
parent | a452714799b36fae4c34e7167122d2b26ff07747 (diff) |
qtikz: update to Qt5; remove ktikz
Diffstat (limited to 'pkgs/applications')
-rw-r--r-- | pkgs/applications/graphics/ktikz/default.nix | 114 |
1 files changed, 53 insertions, 61 deletions
diff --git a/pkgs/applications/graphics/ktikz/default.nix b/pkgs/applications/graphics/ktikz/default.nix index e351534f9e6a7..5d0bbcad54fd4 100644 --- a/pkgs/applications/graphics/ktikz/default.nix +++ b/pkgs/applications/graphics/ktikz/default.nix @@ -1,78 +1,70 @@ -{ withKDE ? true -, stdenv, fetchurl, gettext, poppler_qt4, qt4 -# Qt only (no KDE): -, pkgconfig -# With KDE -, cmake, automoc4, kdelibs -}: +{ stdenv, fetchFromGitHub, gettext, poppler_qt5, qt5 , pkgconfig }: -# Warning: You will also need a working pdflatex installation containing (at -# least) auctex and pgf. +# Warning: You will also need a working pdflatex installation containing +# at least auctex and pgf. -assert withKDE -> kdelibs != null; +# 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. -let - version = "0.10"; +stdenv.mkDerivation rec { + version = "unstable-20161122"; + name = "qtikz-${version}"; - qtikz = { - name = "qtikz-${version}"; + src = fetchFromGitHub { + owner = "fhackenberger"; + repo = "ktikz"; + rev = "be66c8b1ff7e6b791b65af65e83c4926f307cf5a"; + sha256 = "15jx53sjlnky4yg3ry1i1c29g28v1jbbvhbz66h7a49pfxa40fj3"; + }; - conf = '' - # installation prefix: - #PREFIX = "" + meta = with stdenv.lib; { + description = "Editor for the TikZ language"; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = [ maintainers.layus ]; + }; - # install desktop file here (*nix only): - DESKTOPDIR = ''$''${PREFIX}/share/applications + conf = '' + # installation prefix: + PREFIX = @out@ - # install mimetype here: - MIMEDIR = ''$''${PREFIX}/share/mime/packages + # install desktop file here (*nix only): + DESKTOP_INSTALL_DIR = @out@/share/applications - CONFIG -= debug - CONFIG += release + # install mimetype here: + MIME_INSTALL_DIR = @out@/share/mime/packages - # qmake command: - QMAKECOMMAND = qmake - # lrelease command: - LRELEASECOMMAND = lrelease - # qcollectiongenerator command: - #QCOLLECTIONGENERATORCOMMAND = qcollectiongenerator + # install doc here: + MAN_INSTALL_DIR = @out@/share/man - # TikZ documentation default file path: - TIKZ_DOCUMENTATION_DEFAULT = ''$''${PREFIX}/share/doc/texmf/pgf/pgfmanual.pdf.gz - ''; + CONFIG -= debug + CONFIG += release - patchPhase = '' - echo "$conf" > conf.pri - ''; + # qmake command: + QMAKECOMMAND = qmake + # lrelease command: + LRELEASECOMMAND = lrelease + # qcollectiongenerator command: + #QCOLLECTIONGENERATORCOMMAND = qcollectiongenerator - configurePhase = '' - qmake PREFIX="$out" ./qtikz.pro - ''; + # TikZ documentation default file path: + TIKZ_DOCUMENTATION_DEFAULT = @out@/share/doc/texmf/pgf/pgfmanual.pdf.gz + ''; - buildInputs = [ gettext qt4 poppler_qt4 pkgconfig ]; - }; + # 1. Configuration is done by overwriting qtikzconfig.pri + # 2. Recent Qt removed QString::fromAscii in favor of QString::fromLatin1 + patchPhase = '' + echo "$conf" | sed "s!@out@!$out!g" > qmake/qtikzconfig.pri + find -name "*.cpp" -exec sed -i s/fromAscii/fromLatin1/g "{}" \; + ''; - ktikz = { - name = "ktikz-${version}"; - buildInputs = [ kdelibs cmake qt4 automoc4 gettext poppler_qt4 ]; - }; + configurePhase = '' + qmake PREFIX="$out" ./qtikz.pro + ''; - common = { - inherit version; - src = fetchurl { - url = "http://www.hackenberger.at/ktikz/ktikz_${version}.tar.gz"; - sha256 = "19jl49r7dw3vb3hg52man8p2lszh71pvnx7d0xawyyi0x6r8ml9i"; - }; - - enableParallelBuilding = true; - - meta = with stdenv.lib; { - description = "Editor for the TikZ language"; - license = licenses.gpl2; - platforms = platforms.linux; - maintainers = [ maintainers.layus ]; - }; - }; + buildInputs = [ gettext qt5.full poppler_qt5 pkgconfig ]; -in stdenv.mkDerivation (common // (if withKDE then ktikz else qtikz)) + enableParallelBuilding = true; +} |