2021-10-14 21:23:27 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
2018-09-13 07:27:08 +00:00
|
|
|
ctags,
|
2021-10-14 21:23:27 +00:00
|
|
|
cmark,
|
2018-07-31 00:34:30 +00:00
|
|
|
desktop-file-utils,
|
2022-08-06 12:50:13 +00:00
|
|
|
editorconfig-core-c,
|
2022-02-16 18:35:39 +00:00
|
|
|
fetchurl,
|
2018-07-31 00:34:30 +00:00
|
|
|
flatpak,
|
2021-05-07 21:18:14 +00:00
|
|
|
gnome,
|
2018-12-14 15:05:44 +00:00
|
|
|
libgit2-glib,
|
2021-10-14 21:23:27 +00:00
|
|
|
gi-docgen,
|
2018-12-02 11:41:15 +00:00
|
|
|
gobject-introspection,
|
2024-08-07 13:35:59 +00:00
|
|
|
gom,
|
2022-07-23 15:47:04 +00:00
|
|
|
gtk4,
|
|
|
|
gtksourceview5,
|
2018-07-31 00:34:30 +00:00
|
|
|
json-glib,
|
|
|
|
jsonrpc-glib,
|
2022-07-23 15:47:04 +00:00
|
|
|
libadwaita,
|
2023-02-25 03:03:12 +00:00
|
|
|
libdex,
|
2022-07-23 15:47:04 +00:00
|
|
|
libpanel,
|
2023-08-07 07:56:26 +00:00
|
|
|
libpeas2,
|
2022-07-23 15:47:04 +00:00
|
|
|
libportal-gtk4,
|
2024-09-17 13:28:29 +00:00
|
|
|
libspelling,
|
2023-09-18 13:42:20 +00:00
|
|
|
libsysprof-capture,
|
2018-07-31 00:34:30 +00:00
|
|
|
libxml2,
|
|
|
|
meson,
|
|
|
|
ninja,
|
|
|
|
ostree,
|
2019-09-02 16:44:11 +00:00
|
|
|
pcre2,
|
2021-01-19 06:50:56 +00:00
|
|
|
pkg-config,
|
2018-07-31 00:34:30 +00:00
|
|
|
python3,
|
|
|
|
sysprof,
|
|
|
|
template-glib,
|
|
|
|
vala,
|
2022-07-23 15:47:04 +00:00
|
|
|
vte-gtk4,
|
2023-02-25 12:08:54 +00:00
|
|
|
webkitgtk_6_0,
|
2022-07-23 15:47:04 +00:00
|
|
|
wrapGAppsHook4,
|
2019-03-07 15:48:05 +00:00
|
|
|
dbus,
|
2021-05-08 13:45:03 +00:00
|
|
|
xvfb-run,
|
2018-07-29 03:48:43 +00:00
|
|
|
}:
|
2019-03-07 15:48:05 +00:00
|
|
|
|
2024-05-25 17:52:24 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2018-07-29 03:48:43 +00:00
|
|
|
pname = "gnome-builder";
|
2024-10-31 12:28:37 +00:00
|
|
|
version = "47.2";
|
2021-10-14 21:23:27 +00:00
|
|
|
|
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"devdoc"
|
|
|
|
];
|
2018-07-29 03:48:43 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2024-05-25 17:52:24 +00:00
|
|
|
url = "mirror://gnome/sources/gnome-builder/${lib.versions.major finalAttrs.version}/gnome-builder-${finalAttrs.version}.tar.xz";
|
2024-10-31 12:28:37 +00:00
|
|
|
hash = "sha256-Roe5PEfNHjNmWi3FA3kLYhPugnhy/ABNl40UvL+ptJU=";
|
2018-07-29 03:48:43 +00:00
|
|
|
};
|
|
|
|
|
2022-07-23 15:47:04 +00:00
|
|
|
patches = [
|
|
|
|
# The test environment hardcodes `GI_TYPELIB_PATH` environment variable to direct dependencies of libide & co.
|
|
|
|
# https://gitlab.gnome.org/GNOME/gnome-builder/-/commit/2ce510b0ec0518c29427a29b386bb2ac1a121edf
|
|
|
|
# https://gitlab.gnome.org/GNOME/gnome-builder/-/commit/2964f7c2a0729f2f456cdca29a0f5b7525baf7c1
|
|
|
|
#
|
|
|
|
# But Nix does not have a fallback path for typelibs like /usr/lib on FHS distros and relies solely
|
|
|
|
# on `GI_TYPELIB_PATH` environment variable. So, when Ide started to depend on Vte, which
|
|
|
|
# depends on Pango, among others, GIrepository was unable to find these indirect dependencies
|
|
|
|
# and crashed with:
|
|
|
|
#
|
|
|
|
# Typelib file for namespace 'Pango', version '1.0' not found (g-irepository-error-quark, 0)
|
|
|
|
./fix-finding-test-typelibs.patch
|
|
|
|
];
|
|
|
|
|
2018-07-30 22:04:31 +00:00
|
|
|
nativeBuildInputs = [
|
2018-07-31 00:34:30 +00:00
|
|
|
desktop-file-utils
|
2022-11-11 23:00:15 +00:00
|
|
|
gi-docgen
|
2018-12-02 11:41:15 +00:00
|
|
|
gobject-introspection
|
2020-04-04 23:35:33 +00:00
|
|
|
meson
|
2018-07-29 03:48:43 +00:00
|
|
|
ninja
|
2021-01-19 06:50:56 +00:00
|
|
|
pkg-config
|
2018-09-03 21:55:43 +00:00
|
|
|
python3
|
2022-07-23 15:47:04 +00:00
|
|
|
wrapGAppsHook4
|
2018-07-30 22:04:31 +00:00
|
|
|
];
|
2018-07-29 03:48:43 +00:00
|
|
|
|
2018-07-30 22:04:31 +00:00
|
|
|
buildInputs = [
|
2018-09-13 07:27:08 +00:00
|
|
|
ctags
|
2021-10-14 21:23:27 +00:00
|
|
|
cmark
|
2022-08-06 12:50:13 +00:00
|
|
|
editorconfig-core-c
|
2018-07-30 22:04:31 +00:00
|
|
|
flatpak
|
2018-12-14 15:05:44 +00:00
|
|
|
libgit2-glib
|
2023-08-07 07:56:26 +00:00
|
|
|
libpeas2
|
2022-07-23 15:47:04 +00:00
|
|
|
libportal-gtk4
|
|
|
|
vte-gtk4
|
2024-08-07 13:35:59 +00:00
|
|
|
gom
|
2022-07-23 15:47:04 +00:00
|
|
|
gtk4
|
|
|
|
gtksourceview5
|
2018-07-29 03:48:43 +00:00
|
|
|
json-glib
|
|
|
|
jsonrpc-glib
|
2022-07-23 15:47:04 +00:00
|
|
|
libadwaita
|
2023-02-25 03:03:12 +00:00
|
|
|
libdex
|
2022-07-23 15:47:04 +00:00
|
|
|
libpanel
|
2024-09-17 13:28:29 +00:00
|
|
|
libspelling
|
2023-09-18 13:42:20 +00:00
|
|
|
libsysprof-capture
|
2018-07-29 03:48:43 +00:00
|
|
|
libxml2
|
2018-07-30 22:04:31 +00:00
|
|
|
ostree
|
2019-09-02 16:44:11 +00:00
|
|
|
pcre2
|
2018-07-30 22:04:31 +00:00
|
|
|
python3
|
2018-07-29 03:48:43 +00:00
|
|
|
template-glib
|
|
|
|
vala
|
2023-02-25 12:08:54 +00:00
|
|
|
webkitgtk_6_0
|
2018-07-29 03:48:43 +00:00
|
|
|
];
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2019-03-07 15:48:05 +00:00
|
|
|
dbus
|
2021-05-08 13:45:03 +00:00
|
|
|
xvfb-run
|
2019-03-07 15:48:05 +00:00
|
|
|
];
|
|
|
|
|
2018-07-29 03:48:43 +00:00
|
|
|
mesonFlags = [
|
2019-03-07 15:48:05 +00:00
|
|
|
"-Ddocs=true"
|
2018-08-01 04:51:11 +00:00
|
|
|
|
|
|
|
# Making the build system correctly detect clang header and library paths
|
|
|
|
# is difficult. Somebody should look into fixing this.
|
2019-03-07 15:48:05 +00:00
|
|
|
"-Dplugin_clang=false"
|
|
|
|
|
|
|
|
# Do not try to check if appstream images exist
|
|
|
|
"-Dnetwork_tests=false"
|
2018-07-29 03:48:43 +00:00
|
|
|
];
|
|
|
|
|
2019-03-07 15:48:05 +00:00
|
|
|
doCheck = true;
|
2018-08-01 04:51:11 +00:00
|
|
|
|
2022-02-16 18:35:39 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs build-aux/meson/post_install.py
|
2022-07-23 15:47:04 +00:00
|
|
|
substituteInPlace build-aux/meson/post_install.py \
|
|
|
|
--replace "gtk-update-icon-cache" "gtk4-update-icon-cache"
|
2022-02-16 18:35:39 +00:00
|
|
|
'';
|
|
|
|
|
2019-03-07 15:48:05 +00:00
|
|
|
checkPhase = ''
|
2022-12-25 10:09:09 +00:00
|
|
|
GTK_A11Y=none \
|
2019-03-07 15:48:05 +00:00
|
|
|
xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
|
2022-11-21 02:03:50 +00:00
|
|
|
--config-file=${dbus}/share/dbus-1/session.conf \
|
2019-03-07 15:48:05 +00:00
|
|
|
meson test --print-errorlogs
|
2018-07-31 06:05:11 +00:00
|
|
|
'';
|
|
|
|
|
2018-07-29 03:48:43 +00:00
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
2023-09-18 13:42:20 +00:00
|
|
|
# For sysprof-agent
|
|
|
|
--prefix PATH : "${sysprof}/bin"
|
2018-07-29 03:48:43 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# Ensure that all plugins get their interpreter paths fixed up.
|
|
|
|
find $out/lib -name \*.py -type f -print0 | while read -d "" f; do
|
|
|
|
chmod a+x "$f"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-10-14 21:23:27 +00:00
|
|
|
postFixup = ''
|
|
|
|
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
|
|
|
|
moveToOutput share/doc/libide "$devdoc"
|
|
|
|
'';
|
|
|
|
|
2021-05-07 21:18:14 +00:00
|
|
|
passthru.updateScript = gnome.updateScript {
|
2024-05-25 17:52:24 +00:00
|
|
|
packageName = "gnome-builder";
|
2021-03-20 23:57:24 +00:00
|
|
|
};
|
2018-07-29 03:48:43 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-07-29 03:48:43 +00:00
|
|
|
description = "IDE for writing GNOME-based software";
|
2018-08-01 05:46:47 +00:00
|
|
|
longDescription = ''
|
|
|
|
Global search, auto-completion, source code map, documentation
|
|
|
|
reference, and other features expected in an IDE, but with a focus
|
|
|
|
on streamlining GNOME-based development projects.
|
|
|
|
|
|
|
|
This package does not pull in the dependencies needed for every
|
|
|
|
plugin. If you find that a plugin you wish to use doesn't work, we
|
|
|
|
currently recommend running gnome-builder inside a nix-shell with
|
|
|
|
appropriate dependencies loaded.
|
|
|
|
'';
|
2024-05-01 03:44:27 +00:00
|
|
|
homepage = "https://apps.gnome.org/Builder/";
|
2018-07-30 22:04:31 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2020-04-01 12:40:51 +00:00
|
|
|
maintainers = teams.gnome.members;
|
2018-07-29 03:48:43 +00:00
|
|
|
platforms = platforms.linux;
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "gnome-builder";
|
2018-08-01 20:12:54 +00:00
|
|
|
};
|
2024-05-25 17:52:24 +00:00
|
|
|
})
|