nixpkgs/pkgs/development/libraries/gjs/default.nix
Jan Tojnar a2f6928257
gjs: clean up
* format
* add homepage
2019-11-05 00:49:38 +01:00

81 lines
1.7 KiB
Nix

{ fetchurl
, stdenv
, pkgconfig
, gnome3
, gtk3
, atk
, gobject-introspection
, spidermonkey_60
, pango
, readline
, glib
, libxml2
, dbus
, gdk-pixbuf
, makeWrapper
}:
stdenv.mkDerivation rec {
pname = "gjs";
version = "1.58.1";
src = fetchurl {
url = "mirror://gnome/sources/gjs/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "1xf68rbagkflb9yi3visfw8cbxqlzd717y8jakgw0y6whzm1dpxl";
};
outputs = [ "out" "installedTests" ];
nativeBuildInputs = [
pkgconfig
makeWrapper
];
buildInputs = [
libxml2
gobject-introspection
glib
pango
readline
dbus
];
propagatedBuildInputs = [
spidermonkey_60
];
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
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"
'';
passthru = {
updateScript = gnome3.updateScript {
packageName = "gjs";
};
};
meta = with stdenv.lib; {
description = "JavaScript bindings for GNOME";
homepage = "https://gitlab.gnome.org/GNOME/gjs/blob/master/doc/Home.md";
license = licenses.lgpl2Plus;
maintainers = gnome3.maintainers;
platforms = platforms.linux;
};
}