2019-11-04 23:49:38 +00:00
|
|
|
{ fetchurl
|
|
|
|
, stdenv
|
|
|
|
, pkgconfig
|
|
|
|
, gnome3
|
|
|
|
, gtk3
|
|
|
|
, atk
|
|
|
|
, gobject-introspection
|
|
|
|
, spidermonkey_60
|
|
|
|
, pango
|
2019-11-20 22:55:02 +00:00
|
|
|
, cairo
|
2019-11-04 23:49:38 +00:00
|
|
|
, readline
|
|
|
|
, glib
|
|
|
|
, libxml2
|
|
|
|
, dbus
|
|
|
|
, gdk-pixbuf
|
|
|
|
, makeWrapper
|
2019-11-20 22:55:02 +00:00
|
|
|
, nixosTests
|
2019-11-04 23:49:38 +00:00
|
|
|
}:
|
2016-09-18 20:35:23 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "gjs";
|
2020-01-21 16:05:05 +00:00
|
|
|
version = "1.58.4";
|
2018-02-25 20:07:20 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "mirror://gnome/sources/gjs/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2020-01-21 16:05:05 +00:00
|
|
|
sha256 = "0pxxgsb9gvymgr7qsglfdbaa7hy29y01prszjr27f7bpdik3y6i6";
|
2018-02-25 20:07:20 +00:00
|
|
|
};
|
|
|
|
|
2019-11-20 22:55:02 +00:00
|
|
|
outputs = [ "out" "dev" "installedTests" ];
|
2018-02-14 21:19:56 +00:00
|
|
|
|
2019-11-04 23:49:38 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkgconfig
|
|
|
|
makeWrapper
|
2019-11-20 22:55:02 +00:00
|
|
|
libxml2 # for xml-stripblanks
|
2019-11-04 23:49:38 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gobject-introspection
|
2019-11-20 22:55:02 +00:00
|
|
|
cairo
|
2019-11-04 23:49:38 +00:00
|
|
|
readline
|
2019-11-20 22:55:02 +00:00
|
|
|
spidermonkey_60
|
|
|
|
dbus # for dbus-run-session
|
2019-11-04 23:49:38 +00:00
|
|
|
];
|
2016-09-18 20:35:23 +01:00
|
|
|
|
2019-11-04 23:49:38 +00:00
|
|
|
propagatedBuildInputs = [
|
2019-11-20 22:55:02 +00:00
|
|
|
glib
|
2019-11-04 23:49:38 +00:00
|
|
|
];
|
2016-09-18 20:35:23 +01:00
|
|
|
|
2018-02-14 21:19:56 +00: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 20:35:23 +01:00
|
|
|
postInstall = ''
|
2018-02-14 21:19:56 +00:00
|
|
|
moveToOutput "share/installed-tests" "$installedTests"
|
|
|
|
moveToOutput "libexec/gjs/installed-tests" "$installedTests"
|
|
|
|
|
|
|
|
wrapProgram "$installedTests/libexec/gjs/installed-tests/minijasmine" \
|
2019-05-22 12:03:39 +01: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 20:35:23 +01:00
|
|
|
'';
|
|
|
|
|
2019-11-04 23:51:07 +00:00
|
|
|
separateDebugInfo = stdenv.isLinux;
|
|
|
|
|
2019-11-04 23:49:38 +00:00
|
|
|
passthru = {
|
2019-11-20 22:55:02 +00:00
|
|
|
tests = {
|
|
|
|
installed-tests = nixosTests.installed-tests.gjs;
|
|
|
|
};
|
|
|
|
|
2019-11-04 23:49:38 +00:00
|
|
|
updateScript = gnome3.updateScript {
|
|
|
|
packageName = "gjs";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2016-09-18 20:35:23 +01:00
|
|
|
meta = with stdenv.lib; {
|
2018-02-14 20:28:44 +00:00
|
|
|
description = "JavaScript bindings for GNOME";
|
2019-11-04 23:49:38 +00:00
|
|
|
homepage = "https://gitlab.gnome.org/GNOME/gjs/blob/master/doc/Home.md";
|
|
|
|
license = licenses.lgpl2Plus;
|
2016-09-18 20:35:23 +01:00
|
|
|
maintainers = gnome3.maintainers;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|