nixpkgs/pkgs/desktops/gnome-3/core/gjs/default.nix

52 lines
1.6 KiB
Nix
Raw Normal View History

{ fetchurl, stdenv, pkgconfig, gnome3, gtk3, atk, gobject-introspection
, spidermonkey_60, pango, readline, glib, libxml2, dbus, gdk_pixbuf
2018-02-14 21:19:56 +00:00
, makeWrapper }:
stdenv.mkDerivation rec {
name = "gjs-${version}";
version = "1.56.2";
src = fetchurl {
url = "mirror://gnome/sources/gjs/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
sha256 = "1b5321krn89p3f7s2ik6gpfnc61apzljhlnbqky8c88f7n6832ac";
};
passthru = {
updateScript = gnome3.updateScript { packageName = "gjs"; attrPath = "gnome3.gjs"; };
};
2018-02-14 21:19:56 +00:00
outputs = [ "out" "installedTests" ];
nativeBuildInputs = [ pkgconfig makeWrapper ];
buildInputs = [ libxml2 gobject-introspection gtk3 glib pango readline dbus ];
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" \
--prefix GI_TYPELIB_PATH : "${stdenv.lib.makeSearchPath "lib/girepository-1.0" [ gtk3 atk pango.out gdk_pixbuf ]}:$installedTests/libexec/gjs/installed-tests"
'';
meta = with stdenv.lib; {
2018-02-14 20:28:44 +00:00
description = "JavaScript bindings for GNOME";
maintainers = gnome3.maintainers;
platforms = platforms.linux;
2018-02-14 20:28:44 +00:00
license = licenses.lgpl2Plus;
};
}