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

87 lines
1.8 KiB
Nix
Raw Normal View History

2019-11-05 00:49:38 +01:00
{ fetchurl
, stdenv
, pkgconfig
, gnome3
, gtk3
, atk
, gobject-introspection
, spidermonkey_60
, pango
, cairo
2019-11-05 00:49:38 +01:00
, readline
, glib
, libxml2
, dbus
, gdk-pixbuf
, makeWrapper
, nixosTests
2019-11-05 00:49:38 +01:00
}:
stdenv.mkDerivation rec {
pname = "gjs";
2019-10-07 11:44:50 +02:00
version = "1.58.1";
src = fetchurl {
url = "mirror://gnome/sources/gjs/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
2019-10-07 11:44:50 +02:00
sha256 = "1xf68rbagkflb9yi3visfw8cbxqlzd717y8jakgw0y6whzm1dpxl";
};
outputs = [ "out" "dev" "installedTests" ];
2018-02-14 22:19:56 +01:00
2019-11-05 00:49:38 +01:00
nativeBuildInputs = [
pkgconfig
makeWrapper
libxml2 # for xml-stripblanks
2019-11-05 00:49:38 +01:00
];
buildInputs = [
gobject-introspection
cairo
2019-11-05 00:49:38 +01:00
readline
spidermonkey_60
dbus # for dbus-run-session
2019-11-05 00:49:38 +01:00
];
2019-11-05 00:49:38 +01:00
propagatedBuildInputs = [
glib
2019-11-05 00:49:38 +01: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
'';
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"
'';
2019-11-05 00:51:07 +01:00
separateDebugInfo = stdenv.isLinux;
2019-11-05 00:49:38 +01:00
passthru = {
tests = {
installed-tests = nixosTests.installed-tests.gjs;
};
2019-11-05 00:49:38 +01:00
updateScript = gnome3.updateScript {
packageName = "gjs";
};
};
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;
maintainers = gnome3.maintainers;
platforms = platforms.linux;
};
}