about summary refs log tree commit diff
path: root/pkgs/applications/editors/geany
diff options
context:
space:
mode:
author6t8k <58048945+6t8k@users.noreply.github.com>2023-11-02 21:55:46 +0100
committerBjørn Forsman <bjorn.forsman@gmail.com>2023-11-11 12:19:49 +0100
commitcf7ed5d3df05bc869968d858b0f96bab739700ea (patch)
tree3b2f7f0a796ac2bfcaace6c9826d0019012ed519 /pkgs/applications/editors/geany
parent5c43dee215c279dceee7861eec85862ad85cc330 (diff)
geany: 1.38 -> 2.0
https://www.geany.org/documentation/releasenotes/2.0/

Upstream now supports building via Meson, which is declared experimental
at the time of writing; Autotools is still the default. [1]

The correct license for Geany is GPL-2.0-or-later, as indicated by [2].

Add a patch that disables `test_sidebar` because it runs into undefined
behavior in headless environments, and crashes at least on headless
Darwin. The patch can be removed if [3] is merged (or the issue fixed
otherwise).

[1] https://github.com/geany/geany/pull/2761/commits
[2] https://github.com/geany/geany/tree/2.0.0#license
[3] https://github.com/geany/geany/pull/3676
Diffstat (limited to 'pkgs/applications/editors/geany')
-rw-r--r--pkgs/applications/editors/geany/default.nix25
-rw-r--r--pkgs/applications/editors/geany/disable-test-sidebar.patch11
2 files changed, 30 insertions, 6 deletions
diff --git a/pkgs/applications/editors/geany/default.nix b/pkgs/applications/editors/geany/default.nix
index 4ecc511b6540d..517b2ca4fe79a 100644
--- a/pkgs/applications/editors/geany/default.nix
+++ b/pkgs/applications/editors/geany/default.nix
@@ -7,20 +7,27 @@
 , file
 , libintl
 , hicolor-icon-theme
+, python3
 , wrapGAppsHook
 }:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "geany";
-  version = "1.38";
+  version = "2.0";
 
   outputs = [ "out" "dev" "doc" "man" ];
 
   src = fetchurl {
-    url = "https://download.geany.org/${pname}-${version}.tar.bz2";
-    sha256 = "abff176e4d48bea35ee53037c49c82f90b6d4c23e69aed6e4a5ca8ccd3aad546";
+    url = "https://download.geany.org/${finalAttrs.pname}-${finalAttrs.version}.tar.bz2";
+    hash = "sha256-VltM0vAxHB46Fn7HHEoy26ZC4P5VSuW7a4F3t6dMzJI=";
   };
 
+  patches = [
+    # The test runs into UB in headless environments and crashes at least on headless Darwin.
+    # Remove if https://github.com/geany/geany/pull/3676 is merged (or the issue fixed otherwise).
+    ./disable-test-sidebar.patch
+  ];
+
   nativeBuildInputs = [
     pkg-config
     intltool
@@ -28,6 +35,7 @@ stdenv.mkDerivation rec {
     which
     file
     hicolor-icon-theme
+    python3
     wrapGAppsHook
   ];
 
@@ -35,6 +43,11 @@ stdenv.mkDerivation rec {
     gtk3
   ];
 
+  preCheck = ''
+    patchShebangs --build tests/ctags/runner.sh
+    patchShebangs --build scripts
+  '';
+
   doCheck = true;
 
   enableParallelBuilding = true;
@@ -61,9 +74,9 @@ stdenv.mkDerivation rec {
       - Plugin interface
     '';
     homepage = "https://www.geany.org/";
-    license = licenses.gpl2;
+    license = licenses.gpl2Plus;
     maintainers = with maintainers; [ frlan ];
     platforms = platforms.all;
     mainProgram = "geany";
   };
-}
+})
diff --git a/pkgs/applications/editors/geany/disable-test-sidebar.patch b/pkgs/applications/editors/geany/disable-test-sidebar.patch
new file mode 100644
index 0000000000000..a4b71516c5a57
--- /dev/null
+++ b/pkgs/applications/editors/geany/disable-test-sidebar.patch
@@ -0,0 +1,11 @@
+--- a/tests/Makefile.in	2023-10-19 18:10:06.000000000 +0200
++++ b/tests/Makefile.in	2023-11-10 00:13:09.816498568 +0100
+@@ -86,7 +86,7 @@
+ POST_UNINSTALL = :
+ build_triplet = @build@
+ host_triplet = @host@
+-check_PROGRAMS = test_utils$(EXEEXT) test_sidebar$(EXEEXT)
++check_PROGRAMS = test_utils$(EXEEXT)
+ subdir = tests
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \