nixpkgs/pkgs/desktops/gnome/apps/ghex/default.nix
Bobby Rong 7f04037480 gnome.ghex: 45.beta → 45.0
https://gitlab.gnome.org/GNOME/ghex/-/compare/45.beta...45.0

Changelog-reviewed-by: Bobby Rong <rjl931189261@126.com>
Changelog-reviewed-by: Jan Tojnar <jtojnar@gmail.com>
2023-11-21 08:42:32 +01:00

87 lines
1.5 KiB
Nix

{ stdenv
, lib
, fetchurl
, pkg-config
, gi-docgen
, meson
, ninja
, gnome
, desktop-file-utils
, appstream-glib
, gettext
, itstool
, libxml2
, gtk4
, libadwaita
, glib
, atk
, gobject-introspection
, vala
, wrapGAppsHook4
}:
stdenv.mkDerivation rec {
pname = "ghex";
version = "45.0";
outputs = [ "out" "dev" "devdoc" ];
src = fetchurl {
url = "mirror://gnome/sources/ghex/${lib.versions.major version}/${pname}-${version}.tar.xz";
sha256 = "Bc7MRWHKQLJXxdsx2p9o1pYTPvwK5CftgvuYWphuhA4=";
};
nativeBuildInputs = [
desktop-file-utils
gettext
itstool
meson
ninja
pkg-config
gi-docgen
gobject-introspection
vala
wrapGAppsHook4
];
buildInputs = [
gtk4
libadwaita
atk
glib
];
nativeCheckInputs = [
appstream-glib
desktop-file-utils
];
mesonFlags = [
"-Dgtk_doc=true"
"-Dvapi=true"
] ++ lib.optionals stdenv.isDarwin [
# mremap does not exist on darwin
"-Dmmap-buffer-backend=false"
];
postFixup = ''
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
moveToOutput "share/doc" "$devdoc"
'';
passthru = {
updateScript = gnome.updateScript {
packageName = "ghex";
attrPath = "gnome.${pname}";
};
};
meta = with lib; {
homepage = "https://wiki.gnome.org/Apps/Ghex";
description = "Hex editor for GNOME desktop environment";
platforms = platforms.linux;
license = licenses.gpl2Plus;
maintainers = teams.gnome.members;
};
}