From 3593043f4b5764977d3edbcec32ea544f7e94ee7 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 30 Jul 2022 04:20:00 +0000 Subject: [PATCH] gifski: 1.6.4 -> 1.7.0 https://github.com/ImageOptim/gifski/releases/tag/1.7.0 --- .../gifski/cargo.lock-fix-missing-dependency.patch | 12 ++++++++++++ pkgs/tools/graphics/gifski/default.nix | 14 +++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 pkgs/tools/graphics/gifski/cargo.lock-fix-missing-dependency.patch diff --git a/pkgs/tools/graphics/gifski/cargo.lock-fix-missing-dependency.patch b/pkgs/tools/graphics/gifski/cargo.lock-fix-missing-dependency.patch new file mode 100644 index 000000000000..bfccf45b6dcf --- /dev/null +++ b/pkgs/tools/graphics/gifski/cargo.lock-fix-missing-dependency.patch @@ -0,0 +1,12 @@ +diff --git c/Cargo.lock i/Cargo.lock +index 9b8929c..8e1e923 100644 +--- c/Cargo.lock ++++ i/Cargo.lock +@@ -303,6 +303,7 @@ dependencies = [ + "lodepng", + "loop9", + "natord", ++ "num-traits", + "pbr", + "quick-error", + "resize", diff --git a/pkgs/tools/graphics/gifski/default.nix b/pkgs/tools/graphics/gifski/default.nix index bf3cbf420b14..ffd60b5b7783 100644 --- a/pkgs/tools/graphics/gifski/default.nix +++ b/pkgs/tools/graphics/gifski/default.nix @@ -2,21 +2,25 @@ rustPlatform.buildRustPackage rec { pname = "gifski"; - version = "1.6.4"; + version = "1.7.0"; src = fetchFromGitHub { owner = "ImageOptim"; repo = "gifski"; rev = version; - sha256 = "sha256-TD6MSZfvJ8fLJxvDh4fc4Dij5t4WSH2/i9Jz7eBmlME="; + sha256 = "sha256-cycgrQ1f0x1tPziQCRyqWinG8v0SVYW3LpFsxhZpQhE="; }; - cargoSha256 = "sha256-kG0svhytDzm2dc//8WTFm1sI3WS0Ny9yhYTSMoXnt8I="; + cargoPatches = [ ./cargo.lock-fix-missing-dependency.patch ]; - nativeBuildInputs = [ pkg-config ]; + cargoSha256 = "sha256-qJ+awu+Ga3fdxaDKdSzCcdyyuKCheb87qT7tX1dL1zo="; + + nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ]; + + # error: the crate `gifski` is compiled with the panic strategy `abort` which is incompatible with this crate's strategy of `unwind` + doCheck = !stdenv.isDarwin; meta = with lib; { - broken = stdenv.isDarwin; description = "GIF encoder based on libimagequant (pngquant)"; homepage = "https://gif.ski/"; license = licenses.agpl3;