gnome-builder: init at 3.28.4

This commit is contained in:
Jamey Sharp 2018-07-28 20:48:43 -07:00
parent 03e47c388a
commit 126f205752
3 changed files with 126 additions and 0 deletions

@ -0,0 +1,83 @@
{ stdenv, fetchurl, gnome3, gobjectIntrospection, meson, ninja, pkgconfig
, appstream-glib, desktop-file-utils, python3, python3Packages, wrapGAppsHook
, gspell, gtk3, gtksourceview3, json-glib, jsonrpc-glib, libdazzle, libxml2, pcre
, sysprof, template-glib, vala, webkitgtk
}:
let
version = "3.28.4";
pname = "gnome-builder";
in stdenv.mkDerivation {
name = "${pname}-${version}";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${gnome3.versionBranch version}/${pname}-${version}.tar.xz";
sha256 = "0ibb74jlyrl5f6rj1b74196zfg2qaf870lxgi76qzpkgwq0iya05";
};
buildInputs = [
python3Packages.wrapPython
wrapGAppsHook
gobjectIntrospection
meson
ninja
pkgconfig
appstream-glib
desktop-file-utils
gnome3.devhelp
gnome3.libgit2-glib
gnome3.libpeas
gnome3.vte
gspell
gtk3
gtksourceview3
json-glib
jsonrpc-glib
libdazzle
libxml2
pcre
sysprof
template-glib
vala
webkitgtk
];
prePatch = ''
sed -i 's@/usr/bin/env python3@${python3}/bin/python3@g' build-aux/meson/post_install.py
'';
patches = [
./python-libprefix.patch
];
mesonFlags = [
"-Dpython_libprefix=${python3.libPrefix}"
"-Dwith_clang=false"
"-Dwith_flatpak=false"
];
pythonPath = with python3Packages; requiredPythonModules [ pygobject3 ];
preFixup = ''
buildPythonPath "$out $pythonPath"
gappsWrapperArgs+=(
--prefix PATH : "$program_PATH"
--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
'';
passthru.updateScript = gnome3.updateScript { packageName = pname; };
meta = with stdenv.lib; {
description = "An IDE for writing GNOME-based software";
homepage = https://wiki.gnome.org/Apps/Builder;
license = licenses.gpl3;
platforms = platforms.linux;
};
}

@ -0,0 +1,41 @@
--- gnome-builder-3.28.4/meson_options.txt.orig 2018-07-29 15:36:03.605081188 -0700
+++ gnome-builder-3.28.4/meson_options.txt 2018-07-29 15:36:19.877608836 -0700
@@ -15,6 +15,8 @@
option('with_help', type: 'boolean')
option('with_docs', type: 'boolean', value: false)
+option('python_libprefix', type: 'string')
+
# Plugins
# Ideally we want many of these to be defined in the plugin dir:
# https://github.com/mesonbuild/meson/issues/707
--- gnome-builder-3.28.4/src/libide/meson.build.orig 2018-07-29 15:36:03.605081188 -0700
+++ gnome-builder-3.28.4/src/libide/meson.build 2018-07-29 15:36:43.237365710 -0700
@@ -161,6 +161,10 @@
endif
# We want to find the subdirectory to install our override into:
+python_libprefix = get_option('python_libprefix')
+if python_libprefix != ''
+ pygobject_override_dir = join_paths(get_option('libdir'), python_libprefix, 'site_packages', 'gi', 'overrides')
+else
python3 = find_program('python3')
get_overridedir = '''
@@ -190,6 +194,7 @@
else
pygobject_override_dir = join_paths(get_option('libdir'), ret.stdout().strip())
endif
+endif
install_data('Ide.py', install_dir: pygobject_override_dir)
@@ -222,7 +227,7 @@
dependencies: libide_deps,
c_args: libide_args,
install: true,
- install_dir: pkglibdir,
+ install_dir: pkglibdir_abs,
install_rpath: pkglibdir_abs,
)

@ -2717,6 +2717,8 @@ with pkgs;
inherit (gnome2) gnome_python gnome_python_desktop;
};
gnome-builder = callPackage ../applications/editors/gnome-builder { };
gnokii = callPackage ../tools/misc/gnokii { };
gnuapl = callPackage ../development/interpreters/gnu-apl { };