summary refs log tree commit diff
path: root/pkgs/development/libraries/gjs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/gjs')
-rw-r--r--pkgs/development/libraries/gjs/default.nix62
-rw-r--r--pkgs/development/libraries/gjs/installed-tests-path.patch12
2 files changed, 38 insertions, 36 deletions
diff --git a/pkgs/development/libraries/gjs/default.nix b/pkgs/development/libraries/gjs/default.nix
index 1cad5c0deb9..342d498f154 100644
--- a/pkgs/development/libraries/gjs/default.nix
+++ b/pkgs/development/libraries/gjs/default.nix
@@ -1,14 +1,14 @@
 { fetchurl
-, fetchpatch
+, lib
 , stdenv
 , meson
 , ninja
-, pkgconfig
-, gnome3
+, pkg-config
+, gnome
 , gtk3
 , atk
 , gobject-introspection
-, spidermonkey_68
+, spidermonkey_78
 , pango
 , cairo
 , readline
@@ -16,32 +16,41 @@
 , libxml2
 , dbus
 , gdk-pixbuf
+, harfbuzz
 , makeWrapper
 , which
-, xvfb_run
+, xvfb-run
 , nixosTests
 }:
 
 let
   testDeps = [
     gobject-introspection # for Gio and cairo typelibs
-    gtk3 atk pango.out gdk-pixbuf
+    gtk3 atk pango.out gdk-pixbuf harfbuzz
   ];
 in stdenv.mkDerivation rec {
   pname = "gjs";
-  version = "1.64.4";
+  version = "1.68.1";
+
+  outputs = [ "out" "dev" "installedTests" ];
 
   src = fetchurl {
-    url = "mirror://gnome/sources/gjs/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
-    sha256 = "0k6l2qc2vkws34zrgdhl57qxf0jjkar2iziz6qn4n1w7va73mk53";
+    url = "mirror://gnome/sources/gjs/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "0w2cbfpmc6alz7z8ycchhlkn586av5y8zk2xmgwzq10i0k13xyig";
   };
 
-  outputs = [ "out" "dev" "installedTests" ];
+  patches = [
+    # Hard-code various paths
+    ./fix-paths.patch
+
+    # Allow installing installed tests to a separate output.
+    ./installed-tests-path.patch
+  ];
 
   nativeBuildInputs = [
     meson
     ninja
-    pkgconfig
+    pkg-config
     makeWrapper
     which # for locale detection
     libxml2 # for xml-stripblanks
@@ -51,12 +60,12 @@ in stdenv.mkDerivation rec {
     gobject-introspection
     cairo
     readline
-    spidermonkey_68
+    spidermonkey_78
     dbus # for dbus-run-session
   ];
 
   checkInputs = [
-    xvfb_run
+    xvfb-run
   ] ++ testDeps;
 
   propagatedBuildInputs = [
@@ -68,14 +77,6 @@ in stdenv.mkDerivation rec {
     "-Dinstalled_test_prefix=${placeholder "installedTests"}"
   ];
 
-  patches = [
-    # Hard-code various paths
-    ./fix-paths.patch
-
-    # Allow installing installed tests to a separate output.
-    ./installed-tests-path.patch
-  ];
-
   doCheck = true;
 
   postPatch = ''
@@ -88,24 +89,25 @@ in stdenv.mkDerivation rec {
     # in the GIR files. When running tests, the library is not yet installed,
     # though, so we need to replace the absolute path with a local one during build.
     # We are using a symlink that will be overridden during installation.
-    mkdir -p $out/lib $installedTests/libexec/gjs/installed-tests
+    mkdir -p $out/lib $installedTests/libexec/installed-tests/gjs
     ln -s $PWD/libgjs.so.0 $out/lib/libgjs.so.0
-    ln -s $PWD/installed-tests/js/libgimarshallingtests.so $installedTests/libexec/gjs/installed-tests/libgimarshallingtests.so
-    ln -s $PWD/installed-tests/js/libregress.so $installedTests/libexec/gjs/installed-tests/libregress.so
-    ln -s $PWD/installed-tests/js/libwarnlib.so $installedTests/libexec/gjs/installed-tests/libwarnlib.so
+    ln -s $PWD/installed-tests/js/libgimarshallingtests.so $installedTests/libexec/installed-tests/gjs/libgimarshallingtests.so
+    ln -s $PWD/installed-tests/js/libgjstesttools/libgjstesttools.so $installedTests/libexec/installed-tests/gjs/libgjstesttools.so
+    ln -s $PWD/installed-tests/js/libregress.so $installedTests/libexec/installed-tests/gjs/libregress.so
+    ln -s $PWD/installed-tests/js/libwarnlib.so $installedTests/libexec/installed-tests/gjs/libwarnlib.so
   '';
 
   postInstall = ''
-    # TODO: make the glib setup hook handle this
+    # TODO: make the glib setup hook handle moving the schemas in other outputs.
     installedTestsSchemaDatadir="$installedTests/share/gsettings-schemas/${pname}-${version}"
     mkdir -p "$installedTestsSchemaDatadir"
     mv "$installedTests/share/glib-2.0" "$installedTestsSchemaDatadir"
   '';
 
   postFixup = ''
-    wrapProgram "$installedTests/libexec/gjs/installed-tests/minijasmine" \
+    wrapProgram "$installedTests/libexec/installed-tests/gjs/minijasmine" \
       --prefix XDG_DATA_DIRS : "$installedTestsSchemaDatadir" \
-      --prefix GI_TYPELIB_PATH : "${stdenv.lib.makeSearchPath "lib/girepository-1.0" testDeps}"
+      --prefix GI_TYPELIB_PATH : "${lib.makeSearchPath "lib/girepository-1.0" testDeps}"
   '';
 
   checkPhase = ''
@@ -122,12 +124,12 @@ in stdenv.mkDerivation rec {
       installed-tests = nixosTests.installed-tests.gjs;
     };
 
-    updateScript = gnome3.updateScript {
+    updateScript = gnome.updateScript {
       packageName = "gjs";
     };
   };
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "JavaScript bindings for GNOME";
     homepage = "https://gitlab.gnome.org/GNOME/gjs/blob/master/doc/Home.md";
     license = licenses.lgpl2Plus;
diff --git a/pkgs/development/libraries/gjs/installed-tests-path.patch b/pkgs/development/libraries/gjs/installed-tests-path.patch
index f9b1515b68e..09cd8eaff43 100644
--- a/pkgs/development/libraries/gjs/installed-tests-path.patch
+++ b/pkgs/development/libraries/gjs/installed-tests-path.patch
@@ -1,22 +1,22 @@
 diff --git a/installed-tests/meson.build b/installed-tests/meson.build
-index 7e842025..1e5029e0 100644
+index 04c7910f..9647908c 100644
 --- a/installed-tests/meson.build
 +++ b/installed-tests/meson.build
 @@ -1,7 +1,7 @@
  ### Installed tests ############################################################
  
--installed_tests_execdir = get_option('prefix') / pkglibexecdir / 'installed-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' / meson.project_name() / 'installed-tests'
++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 #
  
 diff --git a/meson.build b/meson.build
-index 084d5396..e5d73fcd 100644
+index 9ab29475..42ffe07f 100644
 --- a/meson.build
 +++ b/meson.build
-@@ -540,7 +540,7 @@ install_data('installed-tests/extra/lsan.supp',
+@@ -557,7 +557,7 @@ install_data('installed-tests/extra/lsan.supp',
      install_dir: get_option('datadir') / api_name / 'lsan')
  
  if get_option('installed_tests')
@@ -26,7 +26,7 @@ index 084d5396..e5d73fcd 100644
      meson.add_install_script('build/compile-gschemas.py', schemadir)
  endif
 diff --git a/meson_options.txt b/meson_options.txt
-index 66f66024..008687cb 100644
+index 825ba77a..21f0323c 100644
 --- a/meson_options.txt
 +++ b/meson_options.txt
 @@ -25,3 +25,5 @@ option('skip_gtk_tests', type: 'boolean', value: false,