2021-10-17 02:12:59 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, ctags
|
2021-10-17 02:12:59 +00:00
|
|
|
, cmark
|
2020-04-24 23:36:52 +00:00
|
|
|
, desktop-file-utils
|
2022-10-21 18:38:19 +00:00
|
|
|
, editorconfig-core-c
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchurl
|
2022-10-21 18:38:19 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, flatpak
|
2021-05-20 23:08:51 +00:00
|
|
|
, gnome
|
2020-04-24 23:36:52 +00:00
|
|
|
, libgit2-glib
|
2021-10-17 02:12:59 +00:00
|
|
|
, gi-docgen
|
2020-04-24 23:36:52 +00:00
|
|
|
, gobject-introspection
|
2022-10-21 18:38:19 +00:00
|
|
|
, enchant
|
|
|
|
, icu
|
|
|
|
, gtk4
|
|
|
|
, gtksourceview5
|
2020-04-24 23:36:52 +00:00
|
|
|
, json-glib
|
|
|
|
, jsonrpc-glib
|
2022-10-21 18:38:19 +00:00
|
|
|
, libadwaita
|
|
|
|
, libpanel
|
2020-04-24 23:36:52 +00:00
|
|
|
, libpeas
|
2022-10-21 18:38:19 +00:00
|
|
|
, libportal-gtk4
|
2020-04-24 23:36:52 +00:00
|
|
|
, libxml2
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, ostree
|
2022-10-21 18:38:19 +00:00
|
|
|
, d-spy
|
2020-04-24 23:36:52 +00:00
|
|
|
, pcre2
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, python3
|
|
|
|
, sysprof
|
|
|
|
, template-glib
|
|
|
|
, vala
|
2022-10-21 18:38:19 +00:00
|
|
|
, vte-gtk4
|
|
|
|
, webkitgtk_5_0
|
|
|
|
, wrapGAppsHook4
|
2020-04-24 23:36:52 +00:00
|
|
|
, dbus
|
2021-05-20 23:08:51 +00:00
|
|
|
, xvfb-run
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "gnome-builder";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "43.4";
|
2021-10-17 02:12:59 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "devdoc" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-10-17 02:12:59 +00:00
|
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${pname}-${version}.tar.xz";
|
2022-12-17 10:02:37 +00:00
|
|
|
sha256 = "Hg1tZ4RcGb7J463VlpX5pTHXKg5UKyA6zJD7OBInwrw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-10-21 18:38:19 +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
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
desktop-file-utils
|
2022-12-17 10:02:37 +00:00
|
|
|
gi-docgen
|
2020-04-24 23:36:52 +00:00
|
|
|
gobject-introspection
|
|
|
|
meson
|
|
|
|
ninja
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
python3
|
|
|
|
python3.pkgs.wrapPython
|
2022-10-21 18:38:19 +00:00
|
|
|
wrapGAppsHook4
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
ctags
|
2021-10-17 02:12:59 +00:00
|
|
|
cmark
|
2022-10-21 18:38:19 +00:00
|
|
|
editorconfig-core-c
|
2020-04-24 23:36:52 +00:00
|
|
|
flatpak
|
|
|
|
libgit2-glib
|
|
|
|
libpeas
|
2022-10-21 18:38:19 +00:00
|
|
|
libportal-gtk4
|
|
|
|
vte-gtk4
|
|
|
|
enchant
|
|
|
|
icu
|
|
|
|
gtk4
|
|
|
|
gtksourceview5
|
2020-04-24 23:36:52 +00:00
|
|
|
json-glib
|
|
|
|
jsonrpc-glib
|
2022-10-21 18:38:19 +00:00
|
|
|
libadwaita
|
|
|
|
libpanel
|
2020-04-24 23:36:52 +00:00
|
|
|
libxml2
|
|
|
|
ostree
|
2022-10-21 18:38:19 +00:00
|
|
|
d-spy
|
2020-04-24 23:36:52 +00:00
|
|
|
pcre2
|
|
|
|
python3
|
|
|
|
sysprof
|
|
|
|
template-glib
|
|
|
|
vala
|
2022-10-21 18:38:19 +00:00
|
|
|
webkitgtk_5_0
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
dbus
|
2021-05-20 23:08:51 +00:00
|
|
|
xvfb-run
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
"-Ddocs=true"
|
|
|
|
|
|
|
|
# Making the build system correctly detect clang header and library paths
|
|
|
|
# is difficult. Somebody should look into fixing this.
|
|
|
|
"-Dplugin_clang=false"
|
|
|
|
|
|
|
|
# Do not try to check if appstream images exist
|
|
|
|
"-Dnetwork_tests=false"
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs build-aux/meson/post_install.py
|
2022-10-21 18:38:19 +00:00
|
|
|
substituteInPlace build-aux/meson/post_install.py \
|
|
|
|
--replace "gtk-update-icon-cache" "gtk4-update-icon-cache"
|
2022-03-30 09:31:56 +00:00
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
checkPhase = ''
|
2022-12-28 21:21:41 +00:00
|
|
|
GTK_A11Y=none \
|
2020-04-24 23:36:52 +00:00
|
|
|
xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
|
2022-12-02 08:20:57 +00:00
|
|
|
--config-file=${dbus}/share/dbus-1/session.conf \
|
2020-04-24 23:36:52 +00:00
|
|
|
meson test --print-errorlogs
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonPath = with python3.pkgs; requiredPythonModules [ pygobject3 ];
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
buildPythonPath "$out $pythonPath"
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--prefix PYTHONPATH : "$program_PYTHONPATH"
|
|
|
|
)
|
|
|
|
|
|
|
|
# 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-17 02:12:59 +00:00
|
|
|
postFixup = ''
|
|
|
|
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
|
|
|
|
moveToOutput share/doc/libide "$devdoc"
|
|
|
|
'';
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
passthru.updateScript = gnome.updateScript {
|
|
|
|
packageName = pname;
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "An IDE for writing GNOME-based software";
|
|
|
|
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.
|
|
|
|
'';
|
|
|
|
homepage = "https://wiki.gnome.org/Apps/Builder";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = teams.gnome.members;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|