nix-config/packages/webp-thumbnailer.nix
Donovan Glover d250e8520f
nix: Prefer dontUnpack over phony src
Prevents webp-thumbnailer from being rebuilt when the phony src changes.
2024-04-02 19:12:06 -04:00

24 lines
652 B
Nix

{ stdenvNoCC
, libwebp
}:
stdenvNoCC.mkDerivation {
pname = "webp-thumbnailer";
version = "1.0.0";
dontUnpack = true;
postInstall = /* bash */ ''
mkdir -p $out/share/thumbnailers
echo "[Thumbnailer Entry]" >> $out/share/thumbnailers/webp.thumbnailer
echo "Exec=${libwebp}/bin/dwebp %i -scale %s 0 -o %o" >> $out/share/thumbnailers/webp.thumbnailer
echo "MimeType=image/x-webp;image/webp;" >> $out/share/thumbnailers/webp.thumbnailer
'';
meta = {
homepage = "https://github.com/liquuid/nautilus-webp-thumbnailer";
description = "Create thumbnails from webp files";
};
}