diff options
Diffstat (limited to 'pkgs/desktops/gnome/apps/ghex/default.nix')
-rw-r--r-- | pkgs/desktops/gnome/apps/ghex/default.nix | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/pkgs/desktops/gnome/apps/ghex/default.nix b/pkgs/desktops/gnome/apps/ghex/default.nix new file mode 100644 index 00000000000..500e60feb75 --- /dev/null +++ b/pkgs/desktops/gnome/apps/ghex/default.nix @@ -0,0 +1,84 @@ +{ lib, stdenv +, fetchurl +, fetchpatch +, pkg-config +, meson +, ninja +, python3 +, gnome +, desktop-file-utils +, appstream-glib +, gettext +, itstool +, libxml2 +, gtk3 +, glib +, atk +, wrapGAppsHook +}: + +stdenv.mkDerivation rec { + pname = "ghex"; + version = "3.18.4"; + + outputs = [ "out" "dev" ]; + + src = fetchurl { + url = "mirror://gnome/sources/ghex/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + sha256 = "1h1pjrr9wynclfykizqd78dbi785wjz6b63p31k87kjvzy8w3nf2"; + }; + + nativeBuildInputs = [ + desktop-file-utils + gettext + itstool + meson + ninja + pkg-config + python3 + wrapGAppsHook + ]; + + buildInputs = [ + gtk3 + atk + glib + ]; + + checkInputs = [ + appstream-glib + desktop-file-utils + ]; + + patches = [ + # Fixes for darwin. Drop in next release. + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/ghex/commit/b0af26666cd990d99076c242b2abb3efc6e98671.patch"; + sha256 = "1zwdkgr2nqrn9q3ydyvrrpn5x55cdi747fhbq6mh6blp9cbrk9b5"; + }) + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/ghex/commit/cc8ef9e67b23604c402460010dc0b5dccb85391b.patch"; + sha256 = "0j2165rfhlbrlzhmcnirqd5m89ljpz0n3nz20sxbwlc8h42zv36s"; + }) + ]; + + postPatch = '' + chmod +x meson_post_install.py + patchShebangs meson_post_install.py + ''; + + 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.unix; + license = licenses.gpl2Plus; + maintainers = teams.gnome.members; + }; +} |