git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commit201c1d35f61fb045229da1466e8cf16d0a1f096a authorJan Tojnar <jtojnar@gmail.com> dateWed 20 Nov 2019, 23:55 (7 years ago) parente89b215
1 file changed+12−8
pkgs/development/libraries/gjs/default.nix+12−8
pkgs/development/libraries/gjs/default.nix+12−8
@@ -7,12 +7,14 @@
77, gobject-introspection
88, spidermonkey_60
99, pango
10+, cairo
1011, readline
1112, glib
1213, libxml2
1314, dbus
1415, gdk-pixbuf
1516, makeWrapper
17+, nixosTests
1618}:
1719
1820stdenv.mkDerivation rec {
@@ -24,24 +26,24 @@ stdenv.mkDerivation rec {
2426 sha256 = "1xf68rbagkflb9yi3visfw8cbxqlzd717y8jakgw0y6whzm1dpxl";
2527 };
2628
27− outputs = [ "out" "installedTests" ];
29+ outputs = [ "out" "dev" "installedTests" ];
2830
2931 nativeBuildInputs = [
3032 pkgconfig
3133 makeWrapper
34+ libxml2 # for xml-stripblanks
3235 ];
3336
3437 buildInputs = [
35− libxml2
3638 gobject-introspection
37− glib
38− pango
39+ cairo
3940 readline
40− dbus
41+ spidermonkey_60
42+ dbus # for dbus-run-session
4143 ];
4244
4345 propagatedBuildInputs = [
44− spidermonkey_60
46+ glib
4547 ];
4648
4749 configureFlags = [
@@ -55,8 +57,6 @@ stdenv.mkDerivation rec {
5557 '';
5658
5759 postInstall = ''
58− sed 's|-lreadline|-L${readline.out}/lib -lreadline|g' -i $out/lib/libgjs.la
59−
6060 moveToOutput "share/installed-tests" "$installedTests"
6161 moveToOutput "libexec/gjs/installed-tests" "$installedTests"
6262
@@ -67,6 +67,10 @@ stdenv.mkDerivation rec {
6767 separateDebugInfo = stdenv.isLinux;
6868
6969 passthru = {
70+ tests = {
71+ installed-tests = nixosTests.installed-tests.gjs;
72+ };
73+
7074 updateScript = gnome3.updateScript {
7175 packageName = "gjs";
7276 };