2021-10-14 00:43:12 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchurl
|
2022-03-30 09:31:56 +00:00
|
|
|
, fetchpatch
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2022-03-30 09:31:56 +00:00
|
|
|
, gi-docgen
|
2020-04-24 23:36:52 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, python3
|
2021-05-20 23:08:51 +00:00
|
|
|
, gnome
|
2020-04-24 23:36:52 +00:00
|
|
|
, desktop-file-utils
|
|
|
|
, appstream-glib
|
|
|
|
, gettext
|
|
|
|
, itstool
|
|
|
|
, libxml2
|
2022-03-30 09:31:56 +00:00
|
|
|
, gtk4
|
2020-04-24 23:36:52 +00:00
|
|
|
, glib
|
|
|
|
, atk
|
2022-03-30 09:31:56 +00:00
|
|
|
, gobject-introspection
|
2020-04-24 23:36:52 +00:00
|
|
|
, wrapGAppsHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ghex";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "4.beta.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-03-30 09:31:56 +00:00
|
|
|
url = "mirror://gnome/sources/ghex/${version}/${pname}-${version}.tar.xz";
|
|
|
|
sha256 = "sBS/9cY++uHLGCbLeex8ZW697JJn3dK+HaM6tHBdwJ4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
patches = [
|
|
|
|
# Fix build with -Werror=format-security
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.gnome.org/GNOME/ghex/-/commit/3d35359f3a12b6abb4a3d8a12a0f39b7221be408.patch";
|
|
|
|
sha256 = "4z9nUd+/eBOUGwl3MErse+FKLzGqtWKwkIzej57CnYk=";
|
|
|
|
})
|
|
|
|
# Build devhelp index.
|
|
|
|
# https://gitlab.gnome.org/GNOME/ghex/-/merge_requests/25
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.gnome.org/GNOME/ghex/-/commit/b26a7b1135ea2fe956a9bc0669b3b6ed818716c3.patch";
|
|
|
|
sha256 = "nYjjxds9GNWkW/RhXEe5zJzPF4TnLMsCELEqYR4dXTk=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
desktop-file-utils
|
|
|
|
gettext
|
|
|
|
itstool
|
|
|
|
meson
|
|
|
|
ninja
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2022-03-30 09:31:56 +00:00
|
|
|
gi-docgen
|
2020-04-24 23:36:52 +00:00
|
|
|
python3
|
2022-03-30 09:31:56 +00:00
|
|
|
gobject-introspection
|
2020-04-24 23:36:52 +00:00
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2022-03-30 09:31:56 +00:00
|
|
|
gtk4
|
2020-04-24 23:36:52 +00:00
|
|
|
atk
|
|
|
|
glib
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
appstream-glib
|
|
|
|
desktop-file-utils
|
|
|
|
];
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
mesonFlags = [
|
|
|
|
"-Dgtk_doc=true"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postPatch = ''
|
2022-03-30 09:31:56 +00:00
|
|
|
chmod +x meson_post_install.py
|
|
|
|
patchShebangs meson_post_install.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
|
|
|
|
moveToOutput "share/doc" "$devdoc"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
2021-05-20 23:08:51 +00:00
|
|
|
updateScript = gnome.updateScript {
|
2020-04-24 23:36:52 +00:00
|
|
|
packageName = "ghex";
|
2021-05-20 23:08:51 +00:00
|
|
|
attrPath = "gnome.${pname}";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://wiki.gnome.org/Apps/Ghex";
|
|
|
|
description = "Hex editor for GNOME desktop environment";
|
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = teams.gnome.members;
|
|
|
|
};
|
|
|
|
}
|