mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
2641d97cbf
Reproduction script: # Bulk rewrite ./maintainers/scripts/sha-to-sri.py pkgs/by-name # Revert some packages which will need manual intervention for n in amdvlk azure-cli cargo-profiler corefonts flatito fluxcd gist perf_data_converter protoc-gen-js solana-cli swt verible; do git checkout -- "pkgs/by-name/${n:0:2}/${n}" done
127 lines
2.4 KiB
Nix
127 lines
2.4 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchurl
|
|
, meson
|
|
, ninja
|
|
, gettext
|
|
, itstool
|
|
, pkg-config
|
|
, libxml2
|
|
, libjpeg
|
|
, libpeas
|
|
, libportal-gtk3
|
|
, gnome
|
|
, gtk3
|
|
, libhandy
|
|
, glib
|
|
, gsettings-desktop-schemas
|
|
, gnome-desktop
|
|
, lcms2
|
|
, gdk-pixbuf
|
|
, exempi
|
|
, shared-mime-info
|
|
, wrapGAppsHook3
|
|
, libjxl
|
|
, librsvg
|
|
, webp-pixbuf-loader
|
|
, libheif
|
|
, libexif
|
|
, gobject-introspection
|
|
, gi-docgen
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "eog";
|
|
version = "45.4";
|
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
|
|
|
src = fetchurl {
|
|
url = "mirror://gnome/sources/eog/${lib.versions.major version}/eog-${version}.tar.xz";
|
|
hash = "sha256-tQ8yHHCsZK97yqW0Rg3GdbPKYP2tOFYW86x7dw4GZv4=";
|
|
};
|
|
|
|
patches = [
|
|
# Fix path to libeog.so in the gir file.
|
|
# We patch gobject-introspection to hardcode absolute paths but
|
|
# our Meson patch will only pass the info when install_dir is absolute as well.
|
|
./fix-gir-lib-path.patch
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
meson
|
|
ninja
|
|
pkg-config
|
|
gettext
|
|
itstool
|
|
wrapGAppsHook3
|
|
libxml2 # for xmllint for xml-stripblanks
|
|
gobject-introspection
|
|
gi-docgen
|
|
];
|
|
|
|
buildInputs = [
|
|
libjpeg
|
|
libportal-gtk3
|
|
gtk3
|
|
libhandy
|
|
gdk-pixbuf
|
|
glib
|
|
libpeas
|
|
librsvg
|
|
lcms2
|
|
gnome-desktop
|
|
libexif
|
|
exempi
|
|
gsettings-desktop-schemas
|
|
shared-mime-info
|
|
];
|
|
|
|
mesonFlags = [
|
|
"-Dgtk_doc=true"
|
|
];
|
|
|
|
postInstall = ''
|
|
# Pull in WebP and JXL support for gnome-backgrounds.
|
|
# In postInstall to run before gappsWrapperArgsHook.
|
|
export GDK_PIXBUF_MODULE_FILE="${gnome._gdkPixbufCacheBuilder_DO_NOT_USE {
|
|
extraLoaders = [
|
|
libjxl
|
|
librsvg
|
|
webp-pixbuf-loader
|
|
libheif.out
|
|
];
|
|
}}"
|
|
'';
|
|
|
|
preFixup = ''
|
|
gappsWrapperArgs+=(
|
|
# Thumbnailers
|
|
--prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share"
|
|
--prefix XDG_DATA_DIRS : "${libjxl}/share"
|
|
--prefix XDG_DATA_DIRS : "${librsvg}/share"
|
|
--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" "$devdoc"
|
|
'';
|
|
|
|
passthru = {
|
|
updateScript = gnome.updateScript {
|
|
packageName = "eog";
|
|
};
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "GNOME image viewer";
|
|
homepage = "https://gitlab.gnome.org/GNOME/eog";
|
|
license = licenses.gpl2Plus;
|
|
maintainers = teams.gnome.members;
|
|
platforms = platforms.unix;
|
|
mainProgram = "eog";
|
|
};
|
|
}
|