about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2019-11-20 23:55:02 +0100
committerJan Tojnar <jtojnar@gmail.com>2019-11-21 01:29:03 +0100
commit201c1d35f61fb045229da1466e8cf16d0a1f096a (patch)
treea214e18576a72ca4fc9018b079fede7bb5afce5b /pkgs
parente89b21504f3e61e535229afa0b121defb52d2a50 (diff)
downloadnixlib-201c1d35f61fb045229da1466e8cf16d0a1f096a.tar
nixlib-201c1d35f61fb045229da1466e8cf16d0a1f096a.tar.gz
nixlib-201c1d35f61fb045229da1466e8cf16d0a1f096a.tar.bz2
nixlib-201c1d35f61fb045229da1466e8cf16d0a1f096a.tar.lz
nixlib-201c1d35f61fb045229da1466e8cf16d0a1f096a.tar.xz
nixlib-201c1d35f61fb045229da1466e8cf16d0a1f096a.tar.zst
nixlib-201c1d35f61fb045229da1466e8cf16d0a1f096a.zip
gjs: clean up
* Do not propagate spidermonkey, it is only needed gjs to link against.
* Split out dev output, any propagated dependencies should go there.
* Drop unnecessary sed, the readline thing is no longer there.
* Add passthru.tests to allow running installed tests easily.
* Drop pango from buildInputs, we only need it as a transitive dependency of gtk3 for installed tests; gjs actually depends on cairo.
* Move libxml2 to nativeBuildInputs, it is called by glib-compile-resources when xml-stripblanks preprocessing is used.
* Propagate glib, as it is in Requires in the pc file.

It is just 2.5 MB closure reduction but every megabyte counts.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/gjs/default.nix20
1 files changed, 12 insertions, 8 deletions
diff --git a/pkgs/development/libraries/gjs/default.nix b/pkgs/development/libraries/gjs/default.nix
index 6430be0b57fc..c723a54765b0 100644
--- a/pkgs/development/libraries/gjs/default.nix
+++ b/pkgs/development/libraries/gjs/default.nix
@@ -7,12 +7,14 @@
 , gobject-introspection
 , spidermonkey_60
 , pango
+, cairo
 , readline
 , glib
 , libxml2
 , dbus
 , gdk-pixbuf
 , makeWrapper
+, nixosTests
 }:
 
 stdenv.mkDerivation rec {
@@ -24,24 +26,24 @@ stdenv.mkDerivation rec {
     sha256 = "1xf68rbagkflb9yi3visfw8cbxqlzd717y8jakgw0y6whzm1dpxl";
   };
 
-  outputs = [ "out" "installedTests" ];
+  outputs = [ "out" "dev" "installedTests" ];
 
   nativeBuildInputs = [
     pkgconfig
     makeWrapper
+    libxml2 # for xml-stripblanks
   ];
 
   buildInputs = [
-    libxml2
     gobject-introspection
-    glib
-    pango
+    cairo
     readline
-    dbus
+    spidermonkey_60
+    dbus # for dbus-run-session
   ];
 
   propagatedBuildInputs = [
-    spidermonkey_60
+    glib
   ];
 
   configureFlags = [
@@ -55,8 +57,6 @@ stdenv.mkDerivation rec {
   '';
 
   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"
 
@@ -67,6 +67,10 @@ stdenv.mkDerivation rec {
   separateDebugInfo = stdenv.isLinux;
 
   passthru = {
+    tests = {
+      installed-tests = nixosTests.installed-tests.gjs;
+    };
+
     updateScript = gnome3.updateScript {
       packageName = "gjs";
     };