2019-11-05 00:49:38 +01:00
|
|
|
{ fetchurl
|
|
|
|
, stdenv
|
|
|
|
, pkgconfig
|
|
|
|
, gnome3
|
|
|
|
, gtk3
|
|
|
|
, atk
|
|
|
|
, gobject-introspection
|
|
|
|
, spidermonkey_60
|
|
|
|
, pango
|
2019-11-20 23:55:02 +01:00
|
|
|
, cairo
|
2019-11-05 00:49:38 +01:00
|
|
|
, readline
|
|
|
|
, glib
|
|
|
|
, libxml2
|
|
|
|
, dbus
|
|
|
|
, gdk-pixbuf
|
|
|
|
, makeWrapper
|
2019-11-20 23:55:02 +01:00
|
|
|
, nixosTests
|
2019-11-05 00:49:38 +01:00
|
|
|
}:
|
2016-09-18 21:35:23 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "gjs";
|
2019-10-07 11:44:50 +02:00
|
|
|
version = "1.58.1";
|
2018-02-25 21:07:20 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "mirror://gnome/sources/gjs/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2019-10-07 11:44:50 +02:00
|
|
|
sha256 = "1xf68rbagkflb9yi3visfw8cbxqlzd717y8jakgw0y6whzm1dpxl";
|
2018-02-25 21:07:20 +01:00
|
|
|
};
|
|
|
|
|
2019-11-20 23:55:02 +01:00
|
|
|
outputs = [ "out" "dev" "installedTests" ];
|
2018-02-14 22:19:56 +01:00
|
|
|
|
2019-11-05 00:49:38 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkgconfig
|
|
|
|
makeWrapper
|
2019-11-20 23:55:02 +01:00
|
|
|
libxml2 # for xml-stripblanks
|
2019-11-05 00:49:38 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gobject-introspection
|
2019-11-20 23:55:02 +01:00
|
|
|
cairo
|
2019-11-05 00:49:38 +01:00
|
|
|
readline
|
2019-11-20 23:55:02 +01:00
|
|
|
spidermonkey_60
|
|
|
|
dbus # for dbus-run-session
|
2019-11-05 00:49:38 +01:00
|
|
|
];
|
2016-09-18 21:35:23 +02:00
|
|
|
|
2019-11-05 00:49:38 +01:00
|
|
|
propagatedBuildInputs = [
|
2019-11-20 23:55:02 +01:00
|
|
|
glib
|
2019-11-05 00:49:38 +01:00
|
|
|
];
|
2016-09-18 21:35:23 +02:00
|
|
|
|
2018-02-14 22:19:56 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--enable-installed-tests"
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
for f in installed-tests/*.test.in; do
|
|
|
|
substituteInPlace "$f" --subst-var-by pkglibexecdir "$installedTests/libexec/gjs"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2016-09-18 21:35:23 +02:00
|
|
|
postInstall = ''
|
2018-02-14 22:19:56 +01:00
|
|
|
moveToOutput "share/installed-tests" "$installedTests"
|
|
|
|
moveToOutput "libexec/gjs/installed-tests" "$installedTests"
|
|
|
|
|
|
|
|
wrapProgram "$installedTests/libexec/gjs/installed-tests/minijasmine" \
|
2019-05-22 13:03:39 +02:00
|
|
|
--prefix GI_TYPELIB_PATH : "${stdenv.lib.makeSearchPath "lib/girepository-1.0" [ gtk3 atk pango.out gdk-pixbuf ]}:$installedTests/libexec/gjs/installed-tests"
|
2016-09-18 21:35:23 +02:00
|
|
|
'';
|
|
|
|
|
2019-11-05 00:51:07 +01:00
|
|
|
separateDebugInfo = stdenv.isLinux;
|
|
|
|
|
2019-11-05 00:49:38 +01:00
|
|
|
passthru = {
|
2019-11-20 23:55:02 +01:00
|
|
|
tests = {
|
|
|
|
installed-tests = nixosTests.installed-tests.gjs;
|
|
|
|
};
|
|
|
|
|
2019-11-05 00:49:38 +01:00
|
|
|
updateScript = gnome3.updateScript {
|
|
|
|
packageName = "gjs";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2016-09-18 21:35:23 +02:00
|
|
|
meta = with stdenv.lib; {
|
2018-02-14 21:28:44 +01:00
|
|
|
description = "JavaScript bindings for GNOME";
|
2019-11-05 00:49:38 +01:00
|
|
|
homepage = "https://gitlab.gnome.org/GNOME/gjs/blob/master/doc/Home.md";
|
|
|
|
license = licenses.lgpl2Plus;
|
2016-09-18 21:35:23 +02:00
|
|
|
maintainers = gnome3.maintainers;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|