This repository has been archived on 2024-10-13. You can view files and clone it, but cannot push or open issues or pull requests.
nix-packages/art/emoji/caro/default.nix

47 lines
1.1 KiB
Nix
Raw Permalink Normal View History

2022-11-25 17:56:13 +00:00
{
fetchFromGitHub,
stdenvNoCC,
imagemagick,
lib,
callPackage,
oxipng,
pngquant,
}: let
source = builtins.fromJSON (builtins.readFile ./source.json);
in
stdenvNoCC.mkDerivation {
pname = "caroline-stickers";
version = source.date;
src = fetchFromGitHub {
owner = "CarolineHusky";
repo = "CarolineStickers";
inherit (source) rev sha256;
};
nativeBuildInputs = [
imagemagick
oxipng
pngquant
];
buildPhase = ''
rm credits_*.png
2022-11-27 08:55:48 +00:00
2022-11-25 17:56:13 +00:00
mv "bluefox_thanks I hate it.png" "bluefox_thanks_I_hate_it.png"
mogrify -resize 256x256\> *.png
find . -type f -name '*.png' -execdir ${../../../lib/crushpng.sh} {} {}.new 50000 \;
2022-11-25 17:56:13 +00:00
for f in $(find . -type f -name '*.new'); do
mv $f ${"$"}{f%.new}
done
'';
installPhase = ''
mkdir $out
mv *.png $out
'';
meta = {
description = "CarolineHusky stickers";
license = lib.licenses.cc-by-nc-sa-40;
};
2022-11-27 08:55:48 +00:00
passthru.updateScript = [../../../scripts/update-git.sh "https://github.com/CarolineHusky/CarolineStickers" "art/emoji/caro/source.json"];
2022-11-25 17:56:13 +00:00
}