2021-01-17 03:21:50 +01:00
|
|
|
{lib, stdenv, fetchpatch, fetchurl, autoreconfHook, pkg-config, atk, cairo, glib
|
2019-03-03 22:30:31 +01:00
|
|
|
, gnome-common, gtk2, pango
|
2023-02-11 16:56:58 +01:00
|
|
|
, libxml2Python, perl, intltool, gettext, gtk-mac-integration-gtk2
|
|
|
|
, testers
|
|
|
|
}:
|
2016-12-25 00:56:49 +01:00
|
|
|
|
2023-02-11 16:56:58 +01:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "gtksourceview";
|
2016-04-21 12:18:16 +02:00
|
|
|
version = "2.10.5";
|
|
|
|
|
2023-02-11 16:56:58 +01:00
|
|
|
src = let
|
|
|
|
inherit (finalAttrs) pname version;
|
|
|
|
in fetchurl {
|
|
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.bz2";
|
2016-04-21 12:18:16 +02:00
|
|
|
sha256 = "c585773743b1df8a04b1be7f7d90eecdf22681490d6810be54c81a7ae152191e";
|
2009-09-30 08:29:56 +02:00
|
|
|
};
|
2016-12-25 00:56:49 +01:00
|
|
|
|
2023-02-14 23:34:35 +01:00
|
|
|
patches = lib.optionals stdenv.isDarwin [
|
2016-12-25 00:56:49 +01:00
|
|
|
(fetchpatch {
|
|
|
|
name = "change-igemacintegration-to-gtkosxapplication.patch";
|
2018-05-29 10:11:02 +02:00
|
|
|
url = "https://gitlab.gnome.org/GNOME/gtksourceview/commit/e88357c5f210a8796104505c090fb6a04c213902.patch";
|
2016-12-25 00:56:49 +01:00
|
|
|
sha256 = "0h5q79q9dqbg46zcyay71xn1pm4aji925gjd5j93v4wqn41wj5m7";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
name = "update-to-gtk-mac-integration-2.0-api.patch";
|
2018-05-29 10:11:02 +02:00
|
|
|
url = "https://gitlab.gnome.org/GNOME/gtksourceview/commit/ab46e552e1d0dae73f72adac8d578e40bdadaf95.patch";
|
2016-12-25 00:56:49 +01:00
|
|
|
sha256 = "0qzrbv4hpa0v8qbmpi2vp575n13lkrvp3cgllwrd2pslw1v9q3aj";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-09-25 04:49:25 +02:00
|
|
|
nativeBuildInputs = [ pkg-config intltool ] ++ lib.optionals stdenv.isDarwin [ autoreconfHook ];
|
2016-12-25 00:56:49 +01:00
|
|
|
buildInputs = [
|
2019-03-03 22:30:31 +01:00
|
|
|
atk cairo glib gtk2
|
2022-09-25 04:49:25 +02:00
|
|
|
pango libxml2Python perl
|
2016-12-25 00:56:49 +01:00
|
|
|
gettext
|
2023-02-14 23:34:35 +01:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2022-09-25 04:49:25 +02:00
|
|
|
gnome-common gtk-mac-integration-gtk2
|
2016-12-25 00:56:49 +01:00
|
|
|
];
|
|
|
|
|
2023-02-14 23:34:35 +01:00
|
|
|
preConfigure = lib.optionalString stdenv.isDarwin ''
|
2016-12-25 00:56:49 +01:00
|
|
|
intltoolize --force
|
|
|
|
'';
|
2018-03-25 18:50:06 +02:00
|
|
|
|
2018-04-25 05:20:18 +02:00
|
|
|
doCheck = false; # requires X11 daemon
|
2023-02-11 16:56:58 +01:00
|
|
|
|
|
|
|
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
pkgConfigModules = [ "gtksourceview-2.0" ];
|
|
|
|
};
|
|
|
|
})
|