nixpkgs/pkgs/tools/graphics/gifski/default.nix
Christina Sørensen bdd0f16e0e
gifski: 1.12.2 -> 1.13.0
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-10-24 06:23:21 +02:00

55 lines
1.3 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, ffmpeg
}:
rustPlatform.buildRustPackage rec {
pname = "gifski";
version = "1.13.0";
src = fetchFromGitHub {
owner = "ImageOptim";
repo = "gifski";
rev = version;
hash = "sha256-Ij+bgL935uLCZeh8GQnTFlPIuUloNCn8LUdvMd+6okM=";
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"ffmpeg-sys-next-6.0.1" = "sha256-/KxW57lt9/qKqNUUZqJucsP0cKvZ1m/FdGCsZxBlxYc=";
};
};
nativeBuildInputs = [
pkg-config
rustPlatform.bindgenHook
];
buildInputs = [
ffmpeg
];
buildFeatures = [ "video" ];
# When the default checkType of release is used, we get the following error:
#
# error: the crate `gifski` is compiled with the panic strategy `abort` which
# is incompatible with this crate's strategy of `unwind`
#
# It looks like https://github.com/rust-lang/cargo/issues/6313, which does not
# outline a solution.
#
checkType = "debug";
meta = with lib; {
description = "GIF encoder based on libimagequant (pngquant)";
homepage = "https://gif.ski/";
changelog = "https://github.com/ImageOptim/gifski/releases/tag/${src.rev}";
license = licenses.agpl3Plus;
maintainers = with maintainers; [ figsoda marsam ];
mainProgram = "gifski";
};
}