webp-pixbuf-loader: 0.0.6 -> 0.0.7

Includes changes to build procedure because upstream was restructured to leave loaders.cache generation to distribution.
This commit is contained in:
cwyc 2022-11-08 01:17:26 +00:00
parent 0fbb874cf2
commit aaf29c0198

View file

@ -18,17 +18,17 @@ let
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "webp-pixbuf-loader"; pname = "webp-pixbuf-loader";
version = "0.0.6"; version = "0.0.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "aruiz"; owner = "aruiz";
repo = "webp-pixbuf-loader"; repo = "webp-pixbuf-loader";
rev = version; rev = version;
sha256 = "sha256-dcdydWYrXZJjo4FxJtvzGzrQLOs87/BmxshFZwsT2ws="; sha256 = "sha256-Za5/9YlDRqF5oGI8ZfLhx2ZT0XvXK6Z0h6fu5CGvizc=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [
gdk-pixbuf gdk-pixbuf.dev
meson meson
ninja ninja
pkg-config pkg-config
@ -41,7 +41,6 @@ stdenv.mkDerivation rec {
]; ];
mesonFlags = [ mesonFlags = [
"-Dgdk_pixbuf_query_loaders_path=${gdk-pixbuf.dev}/bin/gdk-pixbuf-query-loaders"
"-Dgdk_pixbuf_moduledir=${placeholder "out"}/${moduleDir}" "-Dgdk_pixbuf_moduledir=${placeholder "out"}/${moduleDir}"
]; ];
@ -51,13 +50,11 @@ stdenv.mkDerivation rec {
--replace "@bindir@/gdk-pixbuf-thumbnailer" "$out/bin/webp-thumbnailer" --replace "@bindir@/gdk-pixbuf-thumbnailer" "$out/bin/webp-thumbnailer"
''; '';
preInstall = ''
# environment variables controlling loaders.cache generation by gdk-pixbuf-query-loaders
export GDK_PIXBUF_MODULE_FILE="$out/${loadersPath}"
export GDK_PIXBUF_MODULEDIR="$out/${moduleDir}"
'';
postInstall = '' postInstall = ''
GDK_PIXBUF_MODULE_FILE="$out/${loadersPath}" \
GDK_PIXBUF_MODULEDIR="$out/${moduleDir}" \
gdk-pixbuf-query-loaders --update-cache
# It assumes gdk-pixbuf-thumbnailer can find the webp loader in the loaders.cache referenced by environment variable, breaking containment. # It assumes gdk-pixbuf-thumbnailer can find the webp loader in the loaders.cache referenced by environment variable, breaking containment.
# So we replace it with a wrapped executable. # So we replace it with a wrapped executable.
mkdir -p "$out/bin" mkdir -p "$out/bin"
@ -71,7 +68,5 @@ stdenv.mkDerivation rec {
license = licenses.lgpl2Plus; license = licenses.lgpl2Plus;
platforms = platforms.unix; platforms = platforms.unix;
maintainers = teams.gnome.members ++ [ maintainers.cwyc ]; maintainers = teams.gnome.members ++ [ maintainers.cwyc ];
# meson.build:16:0: ERROR: Program or command 'gcc' not found or not executable
broken = stdenv.isDarwin;
}; };
} }