From 1c88959cc99d11031e58b08ad67345c3bf7520bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Fri, 25 Nov 2022 18:56:13 +0100 Subject: [PATCH] Add caroline husky stickers --- .github/workflows/build.yml | 1 + art/emoji/caro/default.nix | 46 +++++++++++++++++++++++++++++++++++++ art/emoji/caro/source.json | 11 +++++++++ default.nix | 1 + 4 files changed, 59 insertions(+) create mode 100644 art/emoji/caro/default.nix create mode 100644 art/emoji/caro/source.json diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 229c4af..029412e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,7 @@ jobs: - emoji-volpeon-fox - emoji-volpeon-raccoon - emoji-volpeon-vlpn + - emoji-caro - lotte-art - drone-runner-docker - alco-sans diff --git a/art/emoji/caro/default.nix b/art/emoji/caro/default.nix new file mode 100644 index 0000000..6e52734 --- /dev/null +++ b/art/emoji/caro/default.nix @@ -0,0 +1,46 @@ +{ + 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 + + 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 40000 \; + 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; + }; + passthru.updateScript = [../scripts/update-git.sh "https://github.com/CarolineHusky/CarolineStickers" "art/emoji/caro/source.json"]; + } diff --git a/art/emoji/caro/source.json b/art/emoji/caro/source.json new file mode 100644 index 0000000..1dcd62e --- /dev/null +++ b/art/emoji/caro/source.json @@ -0,0 +1,11 @@ +{ + "url": "https://github.com/CarolineHusky/CarolineStickers", + "rev": "bd717e1c83d24be58612157ffd67ee92fffa8178", + "date": "2022-04-01T14:18:07+02:00", + "path": "/nix/store/g7cq22k0q1fhv6jajzmy2k0sl1xmz7n5-CarolineStickers", + "sha256": "14wgn1jdp698anbkgilf6x90vgkwgls4c17jaa9qqs3fxrj44ij3", + "fetchLFS": false, + "fetchSubmodules": false, + "deepClone": false, + "leaveDotGit": false +} diff --git a/default.nix b/default.nix index 19806ec..e88b4c5 100644 --- a/default.nix +++ b/default.nix @@ -23,6 +23,7 @@ emoji-volpeon-fox = pkgs.callPackage ./art/emoji/volpeon/fox.nix {}; emoji-volpeon-raccoon = pkgs.callPackage ./art/emoji/volpeon/raccoon.nix {}; emoji-volpeon-vlpn = pkgs.callPackage ./art/emoji/volpeon/vlpn.nix {}; + emoji-caro = pkgs.callPackage ./art/emoji/caro {}; lotte-art = pkgs.callPackage ./art/lotte {}; drone-runner-docker = pkgs.callPackage ./ci/drone-runner-docker {}; alco-sans = pkgs.callPackage ./fonts/kreative/alco-sans.nix {};