summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/editors/geany
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2019-11-27 23:27:27 +0100
committerJan Tojnar <jtojnar@gmail.com>2019-11-28 00:05:22 +0100
commit615a5a3dae00fe85093d80fa6ed93566f276643c (patch)
tree884d0515bac9ebd04deb1ed05e0fdbe68e7aa5a4 /pkgs/applications/editors/geany
parente89b21504f3e61e535229afa0b121defb52d2a50 (diff)
geany: clean up and switch to GTK3
GTK 2 has been deprecated for ages now. Also split the outputs and convert geany-with-vte to symlinkJoin for easier merging.
Diffstat (limited to 'pkgs/applications/editors/geany')
-rw-r--r--pkgs/applications/editors/geany/default.nix45
-rw-r--r--pkgs/applications/editors/geany/with-vte.nix32
2 files changed, 54 insertions, 23 deletions
diff --git a/pkgs/applications/editors/geany/default.nix b/pkgs/applications/editors/geany/default.nix
index 1e1a817f092d..d3cc36244193 100644
--- a/pkgs/applications/editors/geany/default.nix
+++ b/pkgs/applications/editors/geany/default.nix
@@ -1,36 +1,51 @@
-{ stdenv, fetchurl, gtk2, which, pkgconfig, intltool, file, libintl, hicolor-icon-theme }:
-
-with stdenv.lib;
-
-let
- version = "1.36";
-in
+{ stdenv
+, fetchurl
+, gtk3
+, which
+, pkgconfig
+, intltool
+, file
+, libintl
+, hicolor-icon-theme
+, wrapGAppsHook
+}:
stdenv.mkDerivation rec {
pname = "geany";
- inherit version;
+ version = "1.36";
+
+ outputs = [ "out" "dev" "doc" "man" ];
src = fetchurl {
url = "https://download.geany.org/${pname}-${version}.tar.bz2";
sha256 = "0gnm17cr4rf3pmkf0axz4a0fxwnvp55ji0q0lzy88yqbshyxv14i";
};
- nativeBuildInputs = [ pkgconfig intltool libintl ];
- buildInputs = [ gtk2 which file hicolor-icon-theme ];
+ nativeBuildInputs = [
+ pkgconfig
+ intltool
+ libintl
+ which
+ file
+ hicolor-icon-theme
+ wrapGAppsHook
+ ];
+
+ buildInputs = [
+ gtk3
+ ];
doCheck = true;
enableParallelBuilding = true;
- patchPhase = "patchShebangs .";
-
- meta = {
+ meta = with stdenv.lib; {
description = "Small and lightweight IDE";
longDescription = ''
Geany is a small and lightweight Integrated Development Environment.
It was developed to provide a small and fast IDE, which has only a few dependencies from other packages.
Another goal was to be as independent as possible from a special Desktop Environment like KDE or GNOME.
- Geany only requires the GTK2 runtime libraries.
+ Geany only requires the GTK runtime libraries.
Some basic features of Geany:
- Syntax highlighting
- Code folding
@@ -45,7 +60,7 @@ stdenv.mkDerivation rec {
- Simple project management
- Plugin interface
'';
- homepage = https://www.geany.org/;
+ homepage = "https://www.geany.org/";
license = licenses.gpl2;
maintainers = with maintainers; [ frlan ];
platforms = platforms.all;
diff --git a/pkgs/applications/editors/geany/with-vte.nix b/pkgs/applications/editors/geany/with-vte.nix
index f7351454fb8c..ece5c95f05ab 100644
--- a/pkgs/applications/editors/geany/with-vte.nix
+++ b/pkgs/applications/editors/geany/with-vte.nix
@@ -1,8 +1,24 @@
-{ runCommand, makeWrapper, geany, gnome2 }:
-let name = builtins.replaceStrings ["geany-"] ["geany-with-vte-"] geany.name;
-in
-runCommand name { nativeBuildInputs = [ makeWrapper ]; inherit (geany.meta); } "
- mkdir -p $out
- ln -s ${geany}/share $out
- makeWrapper ${geany}/bin/geany $out/bin/geany --prefix LD_LIBRARY_PATH : ${gnome2.vte}/lib
-"
+{ symlinkJoin
+, makeWrapper
+, geany
+, lndir
+, vte
+}:
+
+symlinkJoin {
+ name = "geany-with-vte-${geany.version}";
+
+ # TODO: add geany-plugins
+ paths = with geany; [ out doc man ];
+
+ nativeBuildInputs = [ makeWrapper ];
+
+ postBuild = ''
+ # need to replace the directory since it is a symlink
+ rm -r $out/bin; mkdir $out/bin
+ makeWrapper ${geany}/bin/geany $out/bin/geany \
+ --prefix LD_LIBRARY_PATH : ${vte}/lib
+ '';
+
+ inherit (geany.meta);
+}