2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv
|
2019-05-17 02:24:40 +01:00
|
|
|
, fetchFromGitHub
|
2020-07-29 17:33:39 +01:00
|
|
|
, nix-update-script
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config
|
2019-05-17 02:24:40 +01:00
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, python3
|
2019-08-21 22:12:07 +01:00
|
|
|
, mutest
|
2019-08-26 14:04:55 +01:00
|
|
|
, nixosTests
|
2019-05-17 02:24:40 +01:00
|
|
|
, glib
|
|
|
|
, gtk-doc
|
|
|
|
, docbook_xsl
|
|
|
|
, docbook_xml_dtd_43
|
|
|
|
, gobject-introspection
|
2021-06-06 15:22:23 +01:00
|
|
|
, makeWrapper
|
2019-05-17 02:24:40 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "graphene";
|
2021-05-14 15:26:15 +01:00
|
|
|
version = "1.10.6";
|
2019-05-17 02:24:40 +01:00
|
|
|
|
|
|
|
outputs = [ "out" "devdoc" "installedTests" ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ebassi";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-05-14 15:26:15 +01:00
|
|
|
sha256 = "v6YH3fRMTzhp7wmU8in9ukcavzHmOAW54EK9ZwQyFxc=";
|
2019-05-17 02:24:40 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
2021-05-14 15:26:15 +01:00
|
|
|
# Add option for changing installation path of installed tests.
|
2019-05-17 02:24:40 +01:00
|
|
|
./0001-meson-add-options-for-tests-installation-dirs.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
docbook_xml_dtd_43
|
|
|
|
docbook_xsl
|
|
|
|
gtk-doc
|
|
|
|
meson
|
|
|
|
ninja
|
2021-01-19 06:50:56 +00:00
|
|
|
pkg-config
|
2019-08-21 22:12:07 +01:00
|
|
|
gobject-introspection
|
2019-05-17 02:24:40 +01:00
|
|
|
python3
|
2021-06-06 15:22:23 +01:00
|
|
|
makeWrapper
|
2019-05-17 02:24:40 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2019-08-21 22:12:07 +01:00
|
|
|
glib
|
2019-05-17 02:24:40 +01:00
|
|
|
gobject-introspection
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2019-08-21 22:12:07 +01:00
|
|
|
mutest
|
2019-05-17 02:24:40 +01:00
|
|
|
];
|
|
|
|
|
2021-05-14 15:26:15 +01:00
|
|
|
mesonFlags = [
|
|
|
|
"-Dgtk_doc=true"
|
|
|
|
"-Dinstalled_test_datadir=${placeholder "installedTests"}/share"
|
|
|
|
"-Dinstalled_test_bindir=${placeholder "installedTests"}/libexec"
|
|
|
|
];
|
|
|
|
|
2019-08-21 22:12:07 +01:00
|
|
|
doCheck = true;
|
|
|
|
|
2021-05-14 15:26:15 +01:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs tests/gen-installed-test.py
|
2021-06-06 15:22:23 +01:00
|
|
|
PATH=${python3.withPackages (pp: [ pp.pygobject3 pp.tappy ])}/bin:$PATH patchShebangs tests/introspection.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
wrapProgram "${placeholder "installedTests"}/libexec/installed-tests/graphene-1.0/introspection.py" \
|
|
|
|
--prefix GI_TYPELIB_PATH : "$out/lib/girepository-1.0"
|
2021-05-14 15:26:15 +01:00
|
|
|
'';
|
|
|
|
|
2019-08-26 14:04:55 +01:00
|
|
|
passthru = {
|
|
|
|
tests = {
|
2019-11-07 13:11:08 +00:00
|
|
|
installedTests = nixosTests.installed-tests.graphene;
|
2019-08-26 14:04:55 +01:00
|
|
|
};
|
2020-07-29 17:33:39 +01:00
|
|
|
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
attrPath = pname;
|
|
|
|
};
|
2019-08-26 14:04:55 +01:00
|
|
|
};
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2019-05-17 02:24:40 +01:00
|
|
|
description = "A thin layer of graphic data types";
|
|
|
|
homepage = "https://ebassi.github.com/graphene";
|
|
|
|
license = licenses.mit;
|
2021-05-07 14:23:50 +01:00
|
|
|
maintainers = teams.gnome.members ++ (with maintainers; [ ]);
|
2019-05-17 02:24:40 +01:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|