summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/editors/gnome-builder
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2018-07-28 20:48:43 -0700
committerJamey Sharp <jamey@minilop.net>2018-07-30 12:09:03 -0700
commit126f2057521ff0dd32ed8f641300b25cb28f00a3 (patch)
tree122975b2ccbcedbee90fcefa98b3f46db2c3bc3e /pkgs/applications/editors/gnome-builder
parent03e47c388aca8202ee72d2d546067cb5250bfe4b (diff)
gnome-builder: init at 3.28.4
Diffstat (limited to 'pkgs/applications/editors/gnome-builder')
-rw-r--r--pkgs/applications/editors/gnome-builder/default.nix83
-rw-r--r--pkgs/applications/editors/gnome-builder/python-libprefix.patch41
2 files changed, 124 insertions, 0 deletions
diff --git a/pkgs/applications/editors/gnome-builder/default.nix b/pkgs/applications/editors/gnome-builder/default.nix
new file mode 100644
index 000000000000..a8de170d1531
--- /dev/null
+++ b/pkgs/applications/editors/gnome-builder/default.nix
@@ -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;
+ };
+}
diff --git a/pkgs/applications/editors/gnome-builder/python-libprefix.patch b/pkgs/applications/editors/gnome-builder/python-libprefix.patch
new file mode 100644
index 000000000000..744960c08c71
--- /dev/null
+++ b/pkgs/applications/editors/gnome-builder/python-libprefix.patch
@@ -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,
+ )
+