nixpkgs/pkgs/desktops/gnome/devtools/devhelp/default.nix

93 lines
1.8 KiB
Nix
Raw Normal View History

{ lib, stdenv
, fetchurl
, meson
, ninja
2021-01-17 03:21:50 +01:00
, pkg-config
, gnome
, gtk3
, wrapGAppsHook
, glib
, appstream-glib
, gobject-introspection
, python3
, gi-docgen
, webkitgtk
, gettext
, itstool
, gsettings-desktop-schemas
2019-11-04 18:20:42 +01:00
, shared-mime-info
}:
stdenv.mkDerivation rec {
pname = "devhelp";
version = "41.2";
outputs = [ "out" "devdoc" ];
src = fetchurl {
2021-03-21 07:28:15 +01:00
url = "mirror://gnome/sources/devhelp/${lib.versions.major version}/${pname}-${version}.tar.xz";
sha256 = "7KqQsPTaqPsgMPbcaQv1M/+Zp3NDf+Dhis/oLZl/YNI=";
};
nativeBuildInputs = [
meson
ninja
2021-01-17 03:21:50 +01:00
pkg-config
gettext
itstool
wrapGAppsHook
appstream-glib
gobject-introspection
python3
gi-docgen
];
buildInputs = [
glib
gtk3
webkitgtk
gnome.adwaita-icon-theme
gsettings-desktop-schemas
];
mesonFlags = [
"-Dgtk_doc=true"
];
2018-07-31 11:33:51 +02:00
doCheck = true;
postPatch = ''
# patchShebangs requires executable file
chmod +x build-aux/meson/meson_post_install.py
patchShebangs build-aux/meson/meson_post_install.py
2018-07-31 11:33:51 +02:00
'';
2019-11-04 18:20:42 +01:00
preFixup = ''
gappsWrapperArgs+=(
# Fix pages being blank
# https://gitlab.gnome.org/GNOME/devhelp/issues/14
--prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
)
'';
postFixup = ''
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
moveToOutput share/doc/devhelp-3 "$devdoc"
'';
2018-03-15 13:26:13 +01:00
passthru = {
updateScript = gnome.updateScript {
2018-03-15 13:26:13 +01:00
packageName = "devhelp";
attrPath = "gnome.devhelp";
2018-03-15 13:26:13 +01:00
};
};
meta = with lib; {
description = "API documentation browser for GNOME";
homepage = "https://wiki.gnome.org/Apps/Devhelp";
license = licenses.gpl3Plus;
maintainers = teams.gnome.members;
platforms = platforms.linux;
};
}