From 89595fbcea79af385fea634db504827bb0121508 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chadda=C3=AF=20Fouch=C3=A9?= Date: Tue, 22 Apr 2014 23:26:27 +0200 Subject: [PATCH 1/4] Creation of a new package for texstudio, an editor for LaTeX documents --- .../editors/texstudio/default.nix | 24 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/applications/editors/texstudio/default.nix diff --git a/pkgs/applications/editors/texstudio/default.nix b/pkgs/applications/editors/texstudio/default.nix new file mode 100644 index 000000000000..2a2d25ab3f71 --- /dev/null +++ b/pkgs/applications/editors/texstudio/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchurl, qt, popplerQt4, phonon }: + +stdenv.mkDerivation rec { + pname = "texstudio"; + version = "2.7.0"; + name = "${pname}-${version}"; + altname="Texstudio"; + + src = fetchurl { + url = "mirror://sourceforge/texstudio/${altname} ${version}/${name}.tar.gz"; + sha1 = "0a5960689f2f9daef93391b96321ccc8c2e94c38"; + }; + + buildInputs = [ qt popplerQt4 phonon ]; + + preConfigure = "qmake -r PREFIX=$out"; + + meta = with stdenv.lib; { + description = "Fork of TeXMaker, this editor is a full fledged IDE for LaTeX editing with completion, structure viewer, preview and support of any compilation chain."; + homepage = "http://texstudio.sourceforge.net/"; + license = licenses.gpl2Plus; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 48341b9a89da..b63567029eab 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2059,6 +2059,8 @@ let texmaker = callPackage ../applications/editors/texmaker { }; + texstudio = callPackage ../applications/editors/texstudio { qt = qt4; }; + tiled-qt = callPackage ../applications/editors/tiled-qt { qt = qt4; }; tinc = callPackage ../tools/networking/tinc { }; From ed3a809a3dab44585c5c78a2a6f78776427fcacc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chadda=C3=AF=20Fouch=C3=A9?= Date: Wed, 23 Apr 2014 11:58:54 +0200 Subject: [PATCH 2/4] Add the necessary preConfigure so that TeXstudio compile (find poppler-qt4.h) --- pkgs/applications/editors/texstudio/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/editors/texstudio/default.nix b/pkgs/applications/editors/texstudio/default.nix index 2a2d25ab3f71..20e8e4bba3e7 100644 --- a/pkgs/applications/editors/texstudio/default.nix +++ b/pkgs/applications/editors/texstudio/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, qt, popplerQt4, phonon }: +{ stdenv, fetchurl, qt, popplerQt4, zlib}: stdenv.mkDerivation rec { pname = "texstudio"; @@ -7,13 +7,16 @@ stdenv.mkDerivation rec { altname="Texstudio"; src = fetchurl { - url = "mirror://sourceforge/texstudio/${altname} ${version}/${name}.tar.gz"; - sha1 = "0a5960689f2f9daef93391b96321ccc8c2e94c38"; + url = "mirror://sourceforge/texstudio/${name}.tar.gz"; + sha256 = "167d78nfk265jjvl129nr70v8ladb2rav2qyhw7ngr6m54gak831"; }; - buildInputs = [ qt popplerQt4 phonon ]; + buildInputs = [ qt popplerQt4 zlib ]; - preConfigure = "qmake -r PREFIX=$out"; + preConfigure = '' + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$(echo ${popplerQt4}/include/poppler/qt4) " + qmake PREFIX=$out texstudio.pro + ''; meta = with stdenv.lib; { description = "Fork of TeXMaker, this editor is a full fledged IDE for LaTeX editing with completion, structure viewer, preview and support of any compilation chain."; From ce82a2d6d91f3e9d7472eac047d9b34c8e557be6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chadda=C3=AF=20Fouch=C3=A9?= Date: Wed, 23 Apr 2014 12:09:25 +0200 Subject: [PATCH 3/4] Cleaning up the description and fixing qt to qt4 --- pkgs/applications/editors/texstudio/default.nix | 11 ++++++++--- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/editors/texstudio/default.nix b/pkgs/applications/editors/texstudio/default.nix index 20e8e4bba3e7..01f290d9df89 100644 --- a/pkgs/applications/editors/texstudio/default.nix +++ b/pkgs/applications/editors/texstudio/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, qt, popplerQt4, zlib}: +{ stdenv, fetchurl, qt4, popplerQt4, zlib}: stdenv.mkDerivation rec { pname = "texstudio"; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "167d78nfk265jjvl129nr70v8ladb2rav2qyhw7ngr6m54gak831"; }; - buildInputs = [ qt popplerQt4 zlib ]; + buildInputs = [ qt4 popplerQt4 zlib ]; preConfigure = '' export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$(echo ${popplerQt4}/include/poppler/qt4) " @@ -19,7 +19,12 @@ stdenv.mkDerivation rec { ''; meta = with stdenv.lib; { - description = "Fork of TeXMaker, this editor is a full fledged IDE for LaTeX editing with completion, structure viewer, preview and support of any compilation chain."; + description = "TeX and LaTeX editor"; + longDescription='' + Fork of TeXMaker, this editor is a full fledged IDE for + LaTeX editing with completion, structure viewer, preview, + spell checking and support of any compilation chain. + ''; homepage = "http://texstudio.sourceforge.net/"; license = licenses.gpl2Plus; platforms = platforms.linux; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b63567029eab..725a3452b574 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2059,7 +2059,7 @@ let texmaker = callPackage ../applications/editors/texmaker { }; - texstudio = callPackage ../applications/editors/texstudio { qt = qt4; }; + texstudio = callPackage ../applications/editors/texstudio { }; tiled-qt = callPackage ../applications/editors/tiled-qt { qt = qt4; }; From 600bd22f270ae4842d599d2799998f6a2c7b61ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chadda=C3=AF=20Fouch=C3=A9?= Date: Wed, 23 Apr 2014 14:37:00 +0200 Subject: [PATCH 4/4] Adding myself as maintainer of texstudio --- pkgs/applications/editors/texstudio/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/editors/texstudio/default.nix b/pkgs/applications/editors/texstudio/default.nix index 01f290d9df89..cd7f0b78c235 100644 --- a/pkgs/applications/editors/texstudio/default.nix +++ b/pkgs/applications/editors/texstudio/default.nix @@ -28,5 +28,6 @@ stdenv.mkDerivation rec { homepage = "http://texstudio.sourceforge.net/"; license = licenses.gpl2Plus; platforms = platforms.linux; + maintainers = with maintainers; [ cfouche ]; }; }