about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/gjs
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/gjs')
-rw-r--r--nixpkgs/pkgs/development/libraries/gjs/default.nix27
1 files changed, 17 insertions, 10 deletions
diff --git a/nixpkgs/pkgs/development/libraries/gjs/default.nix b/nixpkgs/pkgs/development/libraries/gjs/default.nix
index 9d621e584860..3db1a36e3f3c 100644
--- a/nixpkgs/pkgs/development/libraries/gjs/default.nix
+++ b/nixpkgs/pkgs/development/libraries/gjs/default.nix
@@ -2,13 +2,14 @@
 , lib
 , stdenv
 , meson
+, mesonEmulatorHook
 , ninja
 , pkg-config
 , gnome
 , gtk3
 , atk
 , gobject-introspection
-, spidermonkey_91
+, spidermonkey_102
 , pango
 , cairo
 , readline
@@ -26,18 +27,17 @@
 
 let
   testDeps = [
-    gobject-introspection # for Gio and cairo typelibs
     gtk3 atk pango.out gdk-pixbuf harfbuzz
   ];
 in stdenv.mkDerivation rec {
   pname = "gjs";
-  version = "1.72.1";
+  version = "1.76.0";
 
   outputs = [ "out" "dev" "installedTests" ];
 
   src = fetchurl {
     url = "mirror://gnome/sources/gjs/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
-    sha256 = "sha256-F8Cx7D8JZnH/i/q6bku/FBmMcBPGBL/Wd6mFjaB5wKs=";
+    sha256 = "sha256-pj8VaWSxNgU+q1HqATEU59fBk7dRjSjAQLawLDyTOm0=";
   };
 
   patches = [
@@ -55,18 +55,20 @@ in stdenv.mkDerivation rec {
     makeWrapper
     which # for locale detection
     libxml2 # for xml-stripblanks
+    dbus # for dbus-run-session
+    gobject-introspection
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
   ];
 
   buildInputs = [
-    gobject-introspection
     cairo
     readline
     libsysprof-capture
-    spidermonkey_91
-    dbus # for dbus-run-session
+    spidermonkey_102
   ];
 
-  checkInputs = [
+  nativeCheckInputs = [
     xvfb-run
   ] ++ testDeps;
 
@@ -76,13 +78,18 @@ in stdenv.mkDerivation rec {
 
   mesonFlags = [
     "-Dinstalled_test_prefix=${placeholder "installedTests"}"
+  ] ++ lib.optionals (!stdenv.isLinux || stdenv.hostPlatform.isMusl) [
+    "-Dprofiler=disabled"
   ];
 
-  doCheck = true;
+  doCheck = !stdenv.isDarwin;
 
   postPatch = ''
     patchShebangs build/choose-tests-locale.sh
     substituteInPlace installed-tests/debugger-test.sh --subst-var-by gjsConsole $out/bin/gjs-console
+  '' + lib.optionalString stdenv.hostPlatform.isMusl ''
+    substituteInPlace installed-tests/js/meson.build \
+      --replace "'Encoding'," "#'Encoding',"
   '';
 
   preCheck = ''
@@ -136,6 +143,6 @@ in stdenv.mkDerivation rec {
     homepage = "https://gitlab.gnome.org/GNOME/gjs/blob/master/doc/Home.md";
     license = licenses.lgpl2Plus;
     maintainers = teams.gnome.members;
-    platforms = platforms.linux;
+    platforms = platforms.unix;
   };
 }