mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-22 00:03:55 +01:00
feat: Add thumbnail support for webp files
This commit is contained in:
parent
e6fa09220e
commit
f2aa0efe21
@ -4,10 +4,12 @@
|
|||||||
environment.pathsToLink = [
|
environment.pathsToLink = [
|
||||||
"/share/backgrounds"
|
"/share/backgrounds"
|
||||||
"/share/eww"
|
"/share/eww"
|
||||||
|
"/share/thumbnailers"
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
(pkgs.callPackage ./osu-backgrounds.nix { })
|
(pkgs.callPackage ./osu-backgrounds.nix { })
|
||||||
(pkgs.callPackage ./fluent-icons.nix { })
|
(pkgs.callPackage ./fluent-icons.nix { })
|
||||||
|
(pkgs.callPackage ./webp-thumbnailer.nix { })
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
23
packages/webp-thumbnailer.nix
Normal file
23
packages/webp-thumbnailer.nix
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{ stdenvNoCC
|
||||||
|
, libwebp
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenvNoCC.mkDerivation {
|
||||||
|
pname = "webp-thumbnailer";
|
||||||
|
version = "1.0.0";
|
||||||
|
|
||||||
|
src = ../assets;
|
||||||
|
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user