From 36f022fe36190b57ec590916673ed22cdd4b3602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Sat, 9 Sep 2023 11:23:47 +0100 Subject: [PATCH] disable oxipng --- art/emoji/caro/default.nix | 2 -- lib/crushpng.nix | 3 +-- lib/crushpng.sh | 5 ++--- lib/mkPleromaEmoji.nix | 4 +--- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/art/emoji/caro/default.nix b/art/emoji/caro/default.nix index 4096501..99b772f 100644 --- a/art/emoji/caro/default.nix +++ b/art/emoji/caro/default.nix @@ -4,7 +4,6 @@ imagemagick, lib, callPackage, - oxipng, pngquant, }: let source = builtins.fromJSON (builtins.readFile ./source.json); @@ -19,7 +18,6 @@ in }; nativeBuildInputs = [ imagemagick - oxipng pngquant ]; buildPhase = '' diff --git a/lib/crushpng.nix b/lib/crushpng.nix index 4258869..a18fdb7 100644 --- a/lib/crushpng.nix +++ b/lib/crushpng.nix @@ -1,6 +1,5 @@ { stdenvNoCC, - oxipng, pngquant, }: { name, @@ -10,7 +9,7 @@ stdenvNoCC.mkDerivation { dontUnpack = true; inherit (args) name src maxsize; - nativeBuildInputs = [oxipng pngquant]; + nativeBuildInputs = [pngquant]; buildPhase = '' ${./crushpng.sh} $src $out $maxsize ''; diff --git a/lib/crushpng.sh b/lib/crushpng.sh index 1a92402..c014e7c 100755 --- a/lib/crushpng.sh +++ b/lib/crushpng.sh @@ -2,11 +2,10 @@ set -ex -oxipng -o 4 --strip safe -Z $1 --out $2 -[ "$(wc -c $2 | awk '{print $1}')" -le $3 ] && exit 0 +[ "$(wc -c $1 | awk '{print $1}')" -le $3 ] && exit 0 for i in $(seq 100 -1 0); do - cat $1 | pngquant --quality 0-$i - | oxipng -o 4 --strip safe -Z - --out $2 + cat $1 | pngquant --quality 0-$i - > $2 [ "$(wc -c $2 | awk '{print $1}')" -le $3 ] && exit 0 done diff --git a/lib/mkPleromaEmoji.nix b/lib/mkPleromaEmoji.nix index e0eabd7..20a504f 100644 --- a/lib/mkPleromaEmoji.nix +++ b/lib/mkPleromaEmoji.nix @@ -1,7 +1,6 @@ { stdenv, fetchurl, - oxipng, pngquant, lib, libarchive, @@ -24,7 +23,6 @@ in stdenv.mkDerivation ({ inherit name src; nativeBuildInputs = [ - oxipng pngquant libarchive ]; @@ -41,7 +39,7 @@ in mkdir $out cp -r *.png $out ''; - meta = with lib; { + meta = { inherit (manifestData) description homepage; license = fixLicense manifestData.license; };