From 7740a533663eccc5fb41c598e8e3bf6d532f0dfa Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Wed, 7 Aug 2024 15:40:38 +0000 Subject: [PATCH] =?UTF-8?q?gjs:=201.80.2=20=E2=86=92=201.81.2=20[drop=20be?= =?UTF-8?q?fore=20merge]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://gitlab.gnome.org/GNOME/gjs/-/merge_requests/936 Also add missing glib.out to testDeps since GLib generates its own introspection data. --- pkgs/development/libraries/gjs/default.nix | 21 ++++--- .../libraries/gjs/installed-tests-path.patch | 56 +++++++++++++------ 2 files changed, 51 insertions(+), 26 deletions(-) diff --git a/pkgs/development/libraries/gjs/default.nix b/pkgs/development/libraries/gjs/default.nix index 604435cee510522..5d58fcb23a4552b 100644 --- a/pkgs/development/libraries/gjs/default.nix +++ b/pkgs/development/libraries/gjs/default.nix @@ -1,4 +1,4 @@ -{ fetchurl +{ fetchFromGitLab , lib , stdenv , meson @@ -9,7 +9,7 @@ , gtk3 , atk , gobject-introspection -, spidermonkey_115 +, spidermonkey_128 , pango , cairo , readline @@ -28,17 +28,20 @@ let testDeps = [ - gtk3 atk pango.out gdk-pixbuf harfbuzz + glib.out gtk3 atk pango.out gdk-pixbuf harfbuzz ]; in stdenv.mkDerivation (finalAttrs: { pname = "gjs"; - version = "1.80.2"; + version = "1.81.2-trying-this-on-ofborg-will-drop-this-later"; outputs = [ "out" "dev" "installedTests" ]; - src = fetchurl { - url = "mirror://gnome/sources/gjs/${lib.versions.majorMinor finalAttrs.version}/gjs-${finalAttrs.version}.tar.xz"; - hash = "sha256-E145xaxZEJYjPlV8/ld9ZAk/UFRBHUfLLiFLrX1Bmb0="; + src = fetchFromGitLab { + domain = "gitlab.gnome.org"; + owner = "GNOME"; + repo = "gjs"; + rev = "a6283f98f8659fb4e2c3d70ba9e30ac4eb993e22"; + hash = "sha256-YNEBxEvt3xirzCCrp3lfVt9+kKw7bazsrIr2GAk2ZIw="; }; patches = [ @@ -70,7 +73,7 @@ in stdenv.mkDerivation (finalAttrs: { cairo readline libsysprof-capture - spidermonkey_115 + spidermonkey_128 ]; nativeCheckInputs = [ @@ -147,7 +150,7 @@ in stdenv.mkDerivation (finalAttrs: { description = "JavaScript bindings for GNOME"; homepage = "https://gitlab.gnome.org/GNOME/gjs/blob/master/doc/Home.md"; license = licenses.lgpl2Plus; - maintainers = teams.gnome.members; + maintainers = [ ]; # the gjs commit will be dropped before merge platforms = platforms.unix; }; }) diff --git a/pkgs/development/libraries/gjs/installed-tests-path.patch b/pkgs/development/libraries/gjs/installed-tests-path.patch index 09cd8eaff434bf2..90d6ab4dfdad19b 100644 --- a/pkgs/development/libraries/gjs/installed-tests-path.patch +++ b/pkgs/development/libraries/gjs/installed-tests-path.patch @@ -1,35 +1,57 @@ diff --git a/installed-tests/meson.build b/installed-tests/meson.build -index 04c7910f..9647908c 100644 +index 7a7c48ab..52508c2c 100644 --- a/installed-tests/meson.build +++ b/installed-tests/meson.build -@@ -1,7 +1,7 @@ - ### Installed tests ############################################################ +@@ -30,7 +30,7 @@ foreach test : simple_tests --installed_tests_execdir = get_option('prefix') / get_option('libexecdir') / 'installed-tests' / meson.project_name() --installed_tests_metadir = abs_datadir / 'installed-tests' / meson.project_name() -+installed_tests_execdir = get_option('installed_test_prefix') / 'libexec' / 'installed-tests' / meson.project_name() -+installed_tests_metadir = get_option('installed_test_prefix') / 'share' / 'installed-tests' / meson.project_name() - - # Simple shell script tests # + test_description_subst = { + 'name': 'test@0@.sh'.format(test), +- 'installed_tests_execdir': prefix / installed_tests_execdir, ++ 'installed_tests_execdir': installed_tests_execdir, + } + configure_file(configuration: test_description_subst, + input: 'script.test.in', output: 'test@0@.sh.test'.format(test), +@@ -85,7 +85,7 @@ foreach test : debugger_tests + test_description_subst = { + 'name': '@0@.debugger'.format(test), +- 'installed_tests_execdir': prefix / installed_tests_execdir, ++ 'installed_tests_execdir': installed_tests_execdir, + } + configure_file(configuration: test_description_subst, + input: 'debugger.test.in', diff --git a/meson.build b/meson.build -index 9ab29475..42ffe07f 100644 +index 83dce932..9d3bca18 100644 --- a/meson.build +++ b/meson.build -@@ -557,7 +557,7 @@ install_data('installed-tests/extra/lsan.supp', - install_dir: get_option('datadir') / api_name / 'lsan') +@@ -25,8 +25,8 @@ datadir = get_option('datadir') + libexecdir = get_option('libexecdir') + gjsjsdir = datadir / api_name + pkglibdir = libdir / meson.project_name() +-installed_tests_execdir = libexecdir / 'installed-tests' / meson.project_name() +-installed_tests_metadir = datadir / 'installed-tests' / meson.project_name() ++installed_tests_execdir = get_option('installed_test_prefix') / libexecdir / 'installed-tests' / meson.project_name() ++installed_tests_metadir = get_option('installed_test_prefix') / datadir / 'installed-tests' / meson.project_name() + + ### Check for conflicting build options ######################################## + +@@ -577,9 +577,9 @@ install_data('installed-tests/extra/gjs.supp', install_dir: gjsjsdir / 'valgrind + install_data('installed-tests/extra/lsan.supp', install_dir: gjsjsdir / 'lsan') if get_option('installed_tests') -- schemadir = abs_datadir / 'glib-2.0' / 'schemas' -+ schemadir = get_option('installed_test_prefix') / 'share' / 'glib-2.0' / 'schemas' +- schemadir = datadir / 'glib-2.0' / 'schemas' ++ schemadir = get_option('installed_test_prefix') / datadir / 'glib-2.0' / 'schemas' install_data('installed-tests/js/org.gnome.GjsTest.gschema.xml', install_dir: schemadir) - meson.add_install_script('build/compile-gschemas.py', schemadir) +- meson.add_install_script(glib_compile_schemas, prefix / schemadir, skip_if_destdir: true) ++ meson.add_install_script(glib_compile_schemas, schemadir, skip_if_destdir: true) endif + + ### Generate pkg-config file ################################################### diff --git a/meson_options.txt b/meson_options.txt -index 825ba77a..21f0323c 100644 +index fe425efd..29325756 100644 --- a/meson_options.txt +++ b/meson_options.txt -@@ -25,3 +25,5 @@ option('skip_gtk_tests', type: 'boolean', value: false, +@@ -24,3 +24,5 @@ option('skip_gtk_tests', type: 'boolean', value: false, description: 'Skip tests that need a display connection') option('verbose_logs', type: 'boolean', value: false, description: 'Enable extra log messages that may decrease performance (not allowed in release builds)')