Skip to content

Commit

Permalink
gjs: 1.80.2 → 1.81.2 [drop before merge]
Browse files Browse the repository at this point in the history
https://gitlab.gnome.org/GNOME/gjs/-/merge_requests/936

Also add missing glib.out to testDeps since GLib generates its own introspection data.
  • Loading branch information
bobby285271 committed Aug 7, 2024
1 parent 13a7f8d commit 7740a53
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 26 deletions.
21 changes: 12 additions & 9 deletions pkgs/development/libraries/gjs/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ fetchurl
{ fetchFromGitLab
, lib
, stdenv
, meson
Expand All @@ -9,7 +9,7 @@
, gtk3
, atk
, gobject-introspection
, spidermonkey_115
, spidermonkey_128
, pango
, cairo
, readline
Expand All @@ -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 = [
Expand Down Expand Up @@ -70,7 +73,7 @@ in stdenv.mkDerivation (finalAttrs: {
cairo
readline
libsysprof-capture
spidermonkey_115
spidermonkey_128
];

nativeCheckInputs = [
Expand Down Expand Up @@ -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;
};
})
56 changes: 39 additions & 17 deletions pkgs/development/libraries/gjs/installed-tests-path.patch
Original file line number Diff line number Diff line change
@@ -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)')
Expand Down

0 comments on commit 7740a53

Please sign in to comment.