push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
--- a/gtksourceview/gtksourceview-utils.c 2014-07-13 16:13:57.418687726 +0200
+++ b/gtksourceview/gtksourceview-utils.c 2014-07-13 16:14:20.550847767 +0200
@@ -68,6 +68,8 @@
basename,
NULL));
+ g_ptr_array_add (dirs, g_build_filename ("@NIX_SHARE_PATH@", SOURCEVIEW_DIR, basename, NULL));
+
g_ptr_array_add (dirs, NULL);
return (gchar**) g_ptr_array_free (dirs, FALSE);

View File

@@ -0,0 +1,100 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
atk,
cairo,
glib,
gtk3,
pango,
vala,
libxml2,
perl,
intltool,
gettext,
gobject-introspection,
dbus,
xvfb-run,
shared-mime-info,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "gtksourceview";
version = "3.24.11";
src =
let
inherit (finalAttrs) pname version;
in
fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "1zbpj283b5ycz767hqz5kdq02wzsga65pp4fykvhg8xj6x50f6v9";
};
propagatedBuildInputs = [
# Required by gtksourceview-3.0.pc
gtk3
# Used by gtk_source_language_manager_guess_language
shared-mime-info
];
outputs = [
"out"
"dev"
];
nativeBuildInputs = [
pkg-config
intltool
perl
gobject-introspection
vala
];
nativeCheckInputs = [
xvfb-run
dbus
];
buildInputs = [
atk
cairo
glib
pango
libxml2
gettext
];
preBuild = ''
substituteInPlace gtksourceview/gtksourceview-utils.c --replace "@NIX_SHARE_PATH@" "$out/share"
'';
patches = [ ./3.x-nix_share_path.patch ];
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
};
enableParallelBuilding = true;
doCheck = stdenv.hostPlatform.isLinux;
checkPhase = ''
NO_AT_BRIDGE=1 \
XDG_DATA_DIRS="$XDG_DATA_DIRS:${shared-mime-info}/share" \
xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
--config-file=${dbus}/share/dbus-1/session.conf \
make check
'';
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = with lib; {
homepage = "https://gitlab.gnome.org/GNOME/gtksourceview";
pkgConfigModules = [ "gtksourceview-3.0" ];
platforms = with platforms; linux ++ darwin;
license = licenses.lgpl21;
teams = [ teams.gnome ];
};
})

View File

@@ -0,0 +1,11 @@
--- a/gtksourceview/gtksourceutils.c
+++ b/gtksourceview/gtksourceutils.c
@@ -232,6 +232,8 @@
NULL));
}
+ g_ptr_array_add (dirs, g_build_filename (DATADIR, GSV_DATA_SUBDIR, basename, NULL));
+
g_ptr_array_add (dirs, NULL);
return (gchar **) g_ptr_array_free (dirs, FALSE);

View File

@@ -0,0 +1,137 @@
{
lib,
stdenv,
fetchurl,
fetchpatch2,
meson,
ninja,
pkg-config,
atk,
cairo,
glib,
gtk3,
pango,
fribidi,
vala,
libxml2,
perl,
gettext,
gnome,
gobject-introspection,
dbus,
xvfb-run,
shared-mime-info,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "gtksourceview";
version = "4.8.4";
outputs = [
"out"
"dev"
];
src =
let
inherit (finalAttrs) pname version;
in
fetchurl {
url = "mirror://gnome/sources/gtksourceview/${lib.versions.majorMinor version}/gtksourceview-${version}.tar.xz";
sha256 = "fsnRj7KD0fhKOj7/O3pysJoQycAGWXs/uru1lYQgqH0=";
};
patches = [
# By default, the library loads syntaxes from XDG_DATA_DIRS and user directory
# but not from its own datadr (it assumes it will be in XDG_DATA_DIRS).
# Since this is not generally true with Nix, lets add $out/share unconditionally.
./4.x-nix_share_path.patch
# nix.lang: Add Nix syntax highlighting
# https://gitlab.gnome.org/GNOME/gtksourceview/-/merge_requests/303
(fetchpatch2 {
url = "https://gitlab.gnome.org/GNOME/gtksourceview/-/commit/685b3bd08869c2aefe33fad696a7f5f2dc831016.patch";
hash = "sha256-yeYXJ2l/QS857C4UXOnMFyh0JsptA0TQt0lfD7wN5ic=";
})
# nix.lang: fix section name
(fetchpatch2 {
url = "https://gitlab.gnome.org/GNOME/gtksourceview/-/commit/1dbbb01da98140e0b2d5d0c6c2df29247650ed83.patch";
hash = "sha256-6HxLKQyI5DDvmKhmldQlwVPV62RfFa2gwWbcHA2cICs=";
})
];
nativeBuildInputs = [
meson
ninja
pkg-config
gettext
perl
gobject-introspection
vala
];
buildInputs = [
atk
cairo
glib
pango
fribidi
libxml2
];
propagatedBuildInputs = [
# Required by gtksourceview-4.0.pc
gtk3
# Used by gtk_source_language_manager_guess_language
shared-mime-info
];
nativeCheckInputs = [
xvfb-run
dbus
];
postPatch = ''
# https://gitlab.gnome.org/GNOME/gtksourceview/-/merge_requests/295
# build: drop unnecessary vapigen check
substituteInPlace meson.build \
--replace "if generate_vapi" "if false"
'';
# Broken by PCRE 2 bump in GLib.
# https://gitlab.gnome.org/GNOME/gtksourceview/-/issues/283
doCheck = false;
checkPhase = ''
runHook preCheck
XDG_DATA_DIRS="$XDG_DATA_DIRS:${shared-mime-info}/share" \
xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
--config-file=${dbus}/share/dbus-1/session.conf \
meson test --no-rebuild --print-errorlogs
runHook postCheck
'';
passthru = {
updateScript = gnome.updateScript {
packageName = "gtksourceview";
attrPath = "gtksourceview4";
versionPolicy = "odd-unstable";
freeze = true;
};
};
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = with lib; {
description = "Source code editing widget for GTK";
homepage = "https://gitlab.gnome.org/GNOME/gtksourceview";
pkgConfigModules = [ "gtksourceview-4" ];
platforms = platforms.unix;
license = licenses.lgpl21Plus;
teams = [ teams.gnome ];
};
})

View File

@@ -0,0 +1,122 @@
{
lib,
stdenv,
fetchurl,
meson,
ninja,
pkg-config,
glib,
pcre2,
gtk4,
pango,
fribidi,
vala,
gi-docgen,
libxml2,
perl,
gettext,
gnome,
gobject-introspection,
dbus,
xvfb-run,
shared-mime-info,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "gtksourceview";
version = "5.16.0";
outputs = [
"out"
"dev"
"devdoc"
];
src = fetchurl {
url = "mirror://gnome/sources/gtksourceview/${lib.versions.majorMinor finalAttrs.version}/gtksourceview-${finalAttrs.version}.tar.xz";
hash = "sha256-qzXUIBAvPosFXdO4ZC06SCCfiIGJ5iVND/tLan6MNWY=";
};
patches = [
# By default, the library loads syntaxes from XDG_DATA_DIRS and user directory
# but not from its own datadr (it assumes it will be in XDG_DATA_DIRS).
# Since this is not generally true with Nix, lets add $out/share unconditionally.
./4.x-nix_share_path.patch
];
nativeBuildInputs = [
meson
ninja
pkg-config
gettext
perl
gobject-introspection
vala
gi-docgen
gtk4 # for gtk4-update-icon-cache checked during configure
];
buildInputs = [
glib
pcre2
pango
fribidi
libxml2
];
propagatedBuildInputs = [
# Required by gtksourceview-5.0.pc
gtk4
# Used by gtk_source_language_manager_guess_language
shared-mime-info
];
nativeCheckInputs = [
xvfb-run
dbus
];
mesonFlags = [
"-Ddocumentation=true"
];
doCheck = stdenv.hostPlatform.isLinux;
checkPhase = ''
runHook preCheck
env \
XDG_DATA_DIRS="$XDG_DATA_DIRS:${shared-mime-info}/share" \
GTK_A11Y=none \
xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
--config-file=${dbus}/share/dbus-1/session.conf \
meson test --no-rebuild --print-errorlogs
runHook postCheck
'';
postFixup = ''
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
moveToOutput "share/doc" "$devdoc"
'';
passthru = {
updateScript = gnome.updateScript {
packageName = "gtksourceview";
attrPath = "gtksourceview5";
versionPolicy = "odd-unstable";
};
};
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = with lib; {
description = "Source code editing widget for GTK";
homepage = "https://gitlab.gnome.org/GNOME/gtksourceview";
pkgConfigModules = [ "gtksourceview-5" ];
platforms = platforms.unix;
license = licenses.lgpl21Plus;
teams = [ teams.gnome ];
};
})