summary refs log tree commit diff
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2018-02-14 23:10:07 +0100
committerGitHub <noreply@github.com>2018-02-14 23:10:07 +0100
commit9857545446b76a23940bd4d3ab69470e256fe61f (patch)
treef24edc4c63cba30d0075a8641693daf4357088d4
parent16fa6f59f77fd635665ba719e278bc673ceb1d9e (diff)
parent7713889556b013ef109c35be7fccb378a4f13b6d (diff)
downloadnixlib-9857545446b76a23940bd4d3ab69470e256fe61f.tar
nixlib-9857545446b76a23940bd4d3ab69470e256fe61f.tar.gz
nixlib-9857545446b76a23940bd4d3ab69470e256fe61f.tar.bz2
nixlib-9857545446b76a23940bd4d3ab69470e256fe61f.tar.lz
nixlib-9857545446b76a23940bd4d3ab69470e256fe61f.tar.xz
nixlib-9857545446b76a23940bd4d3ab69470e256fe61f.tar.zst
nixlib-9857545446b76a23940bd4d3ab69470e256fe61f.zip
Merge pull request #34979 from jtojnar/gjs-1.50.4
gnome3.gjs: 1.50.2 → 1.50.4 
-rw-r--r--nixos/release.nix1
-rw-r--r--nixos/tests/gjs.nix19
-rw-r--r--pkgs/desktops/gnome-3/core/gjs/default.nix28
-rw-r--r--pkgs/desktops/gnome-3/core/gjs/src.nix6
4 files changed, 47 insertions, 7 deletions
diff --git a/nixos/release.nix b/nixos/release.nix
index 4cae07dd99ac..984bf8ef0862 100644
--- a/nixos/release.nix
+++ b/nixos/release.nix
@@ -260,6 +260,7 @@ in rec {
   tests.fleet = callTestOnTheseSystems ["x86_64-linux"] tests/fleet.nix {};
   #tests.gitlab = callTest tests/gitlab.nix {};
   tests.gitolite = callTest tests/gitolite.nix {};
+  tests.gjs = callTest tests/gjs.nix {};
   tests.gocd-agent = callTest tests/gocd-agent.nix {};
   tests.gocd-server = callTest tests/gocd-server.nix {};
   tests.gnome3 = callTest tests/gnome3.nix {};
diff --git a/nixos/tests/gjs.nix b/nixos/tests/gjs.nix
new file mode 100644
index 000000000000..e6002ef98dd0
--- /dev/null
+++ b/nixos/tests/gjs.nix
@@ -0,0 +1,19 @@
+# run installed tests
+import ./make-test.nix ({ pkgs, ... }: {
+  name = "gjs";
+
+  meta = {
+    maintainers = pkgs.gnome3.gjs.meta.maintainers;
+  };
+
+  machine = { pkgs, ... }: {
+    imports = [ ./common/x11.nix ];
+    environment.systemPackages = with pkgs; [ gnome-desktop-testing ];
+    environment.variables.XDG_DATA_DIRS = [ "${pkgs.gnome3.gjs.installedTests}/share" ];
+  };
+
+  testScript = ''
+    $machine->waitForX;
+    $machine->succeed("gnome-desktop-testing-runner");
+  '';
+})
diff --git a/pkgs/desktops/gnome-3/core/gjs/default.nix b/pkgs/desktops/gnome-3/core/gjs/default.nix
index dd607e01caef..e2ae74931030 100644
--- a/pkgs/desktops/gnome-3/core/gjs/default.nix
+++ b/pkgs/desktops/gnome-3/core/gjs/default.nix
@@ -1,21 +1,41 @@
-{ fetchurl, stdenv, pkgconfig, gnome3, gtk3, gobjectIntrospection
-, spidermonkey_52, pango, readline, glib, libxml2, dbus }:
+{ fetchurl, stdenv, pkgconfig, gnome3, gtk3, atk, gobjectIntrospection
+, spidermonkey_52, pango, readline, glib, libxml2, dbus, gdk_pixbuf
+, makeWrapper }:
 
 stdenv.mkDerivation rec {
   inherit (import ./src.nix fetchurl) name src;
 
-  nativeBuildInputs = [ pkgconfig ];
+  outputs = [ "out" "installedTests" ];
+
+  nativeBuildInputs = [ pkgconfig makeWrapper ];
   buildInputs = [ libxml2 gobjectIntrospection gtk3 glib pango readline dbus ];
 
   propagatedBuildInputs = [ spidermonkey_52 ];
 
+  configureFlags = [
+    "--enable-installed-tests"
+  ];
+
+  postPatch = ''
+    for f in installed-tests/*.test.in; do
+      substituteInPlace "$f" --subst-var-by pkglibexecdir "$installedTests/libexec/gjs"
+    done
+  '';
+
   postInstall = ''
     sed 's|-lreadline|-L${readline.out}/lib -lreadline|g' -i $out/lib/libgjs.la
+
+    moveToOutput "share/installed-tests" "$installedTests"
+    moveToOutput "libexec/gjs/installed-tests" "$installedTests"
+
+    wrapProgram "$installedTests/libexec/gjs/installed-tests/minijasmine" \
+      --prefix GI_TYPELIB_PATH : "${stdenv.lib.makeSearchPath "lib/girepository-1.0" [ gtk3 atk pango.out gdk_pixbuf ]}:$installedTests/libexec/gjs/installed-tests"
   '';
 
   meta = with stdenv.lib; {
+    description = "JavaScript bindings for GNOME";
     maintainers = gnome3.maintainers;
     platforms = platforms.linux;
+    license = licenses.lgpl2Plus;
   };
-
 }
diff --git a/pkgs/desktops/gnome-3/core/gjs/src.nix b/pkgs/desktops/gnome-3/core/gjs/src.nix
index d3112f02f8ac..d42b2e845585 100644
--- a/pkgs/desktops/gnome-3/core/gjs/src.nix
+++ b/pkgs/desktops/gnome-3/core/gjs/src.nix
@@ -1,10 +1,10 @@
 # Autogenerated by maintainers/scripts/gnome.sh update
 
 fetchurl: {
-  name = "gjs-1.50.2";
+  name = "gjs-1.50.4";
 
   src = fetchurl {
-    url = mirror://gnome/sources/gjs/1.50/gjs-1.50.2.tar.xz;
-    sha256 = "2fad902cf7a7806454121c03918755c646fcfd6b08b52d488987db4e2d691ff3";
+    url = mirror://gnome/sources/gjs/1.50/gjs-1.50.4.tar.xz;
+    sha256 = "b336e8709347e3c94245f6cbc3465f9a49f3ae491a25f49f8a97268f5235b93a";
   };
 }