nixpkgs/pkgs/development/libraries/gjs/default.nix

83 lines
1.8 KiB
Nix
Raw Normal View History

2019-11-04 23:49:38 +00:00
{ fetchurl
, stdenv
, pkgconfig
, gnome3
, gtk3
, atk
, gobject-introspection
, spidermonkey_60
, pango
, readline
, glib
, libxml2
, dbus
, gdk-pixbuf
, makeWrapper
}:
stdenv.mkDerivation rec {
pname = "gjs";
2019-10-07 09:44:50 +00:00
version = "1.58.1";
src = fetchurl {
url = "mirror://gnome/sources/gjs/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
2019-10-07 09:44:50 +00:00
sha256 = "1xf68rbagkflb9yi3visfw8cbxqlzd717y8jakgw0y6whzm1dpxl";
};
2018-02-14 21:19:56 +00:00
outputs = [ "out" "installedTests" ];
2019-11-04 23:49:38 +00:00
nativeBuildInputs = [
pkgconfig
makeWrapper
];
buildInputs = [
libxml2
gobject-introspection
glib
pango
readline
dbus
];
2019-11-04 23:49:38 +00:00
propagatedBuildInputs = [
spidermonkey_60
];
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
'';
postInstall = ''
sed 's|-lreadline|-L${readline.out}/lib -lreadline|g' -i $out/lib/libgjs.la
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 11:03:39 +00:00
--prefix GI_TYPELIB_PATH : "${stdenv.lib.makeSearchPath "lib/girepository-1.0" [ gtk3 atk pango.out gdk-pixbuf ]}:$installedTests/libexec/gjs/installed-tests"
'';
2019-11-04 23:51:07 +00:00
separateDebugInfo = stdenv.isLinux;
2019-11-04 23:49:38 +00:00
passthru = {
updateScript = gnome3.updateScript {
packageName = "gjs";
};
};
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;
maintainers = gnome3.maintainers;
platforms = platforms.linux;
};
}