2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, stdenv
|
|
|
|
, pkg-config
|
2023-07-15 17:15:38 +00:00
|
|
|
, ffmpeg
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "gifski";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "1.11.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ImageOptim";
|
|
|
|
repo = "gifski";
|
|
|
|
rev = version;
|
2023-05-24 13:37:59 +00:00
|
|
|
sha256 = "sha256-sPsq/hntNqOdPJcoob1jrDUrLLiBEnfRoDANyFUjOuM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2023-05-24 13:37:59 +00:00
|
|
|
"ffmpeg-sys-next-6.0.1" = "sha256-/KxW57lt9/qKqNUUZqJucsP0cKvZ1m/FdGCsZxBlxYc=";
|
2023-03-27 19:17:25 +00:00
|
|
|
};
|
|
|
|
};
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
rustPlatform.bindgenHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
ffmpeg
|
|
|
|
];
|
|
|
|
|
|
|
|
buildFeatures = [ "video" ];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
# error: the crate `gifski` is compiled with the panic strategy `abort` which is incompatible with this crate's strategy of `unwind`
|
|
|
|
doCheck = !stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
# error: linker `/usr/bin/x86_64-linux-gnu-gcc` not found
|
|
|
|
postPatch = ''
|
|
|
|
rm .cargo/config.toml;
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "GIF encoder based on libimagequant (pngquant)";
|
|
|
|
homepage = "https://gif.ski/";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/ImageOptim/gifski/releases/tag/${src.rev}";
|
|
|
|
license = licenses.agpl3Plus;
|
|
|
|
maintainers = with maintainers; [ figsoda marsam ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|