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

87 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
, cairo
2019-11-04 23:49:38 +00:00
, readline
, glib
, libxml2
, dbus
, gdk-pixbuf
, makeWrapper
, nixosTests
2019-11-04 23:49:38 +00:00
}:
stdenv.mkDerivation rec {
pname = "gjs";
2020-02-20 02:06:51 +00:00
version = "1.58.5";
src = fetchurl {
url = "mirror://gnome/sources/gjs/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
2020-02-20 02:06:51 +00:00
sha256 = "0fm1szmhdawvgbf9fh6vvkv1fdvbn888fciyi2wkhx48kz09jvg7";
};
outputs = [ "out" "dev" "installedTests" ];
2018-02-14 21:19:56 +00:00
2019-11-04 23:49:38 +00:00
nativeBuildInputs = [
pkgconfig
makeWrapper
libxml2 # for xml-stripblanks
2019-11-04 23:49:38 +00:00
];
buildInputs = [
gobject-introspection
cairo
2019-11-04 23:49:38 +00:00
readline
spidermonkey_60
dbus # for dbus-run-session
2019-11-04 23:49:38 +00:00
];
2019-11-04 23:49:38 +00:00
propagatedBuildInputs = [
glib
2019-11-04 23:49:38 +00: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
'';
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"
'';
2019-11-04 23:51:07 +00:00
separateDebugInfo = stdenv.isLinux;
2019-11-04 23:49:38 +00:00
passthru = {
tests = {
installed-tests = nixosTests.installed-tests.gjs;
};
2019-11-04 23:49:38 +00:00
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;
};
}