add lotte-art

This commit is contained in:
Charlotte 🦝 Delenk 2022-06-22 13:25:02 +01:00
parent a8eb1c21c0
commit 4905db1a7f
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122
5 changed files with 40 additions and 0 deletions

View file

@ -23,6 +23,8 @@ jobs:
run: cd mastodon && ./update.sh
- name: Run update script for matrix-media-repo
run: cd matrix/matrix-media-repo && ./update.sh
- name: Run update script for lotte-art
run: cd art && ./update.sh
- name: Run nix formatter
run: nix fmt
- name: Commit and push

3
art/default.nix Normal file
View file

@ -0,0 +1,3 @@
{pkgs, ...}: {
lotte-art = pkgs.callPackage ./source.nix {};
}

7
art/source.nix Normal file
View file

@ -0,0 +1,7 @@
{fetchgit}:
fetchgit {
url = "https://git.chir.rs/darkkirb/lotte-art";
rev = "5cab735c140d0fb47930db75416138d93c219e7b";
sha256 = "1i0rj25vlycy8rhk8kpz9129h645z0aalwbmfd350j5hpdx0kw65";
fetchLFS = true;
}

27
art/update.sh Executable file
View file

@ -0,0 +1,27 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p nix-prefetch-git jq
WORK_DIR=$(mktemp -d)
URL=https://git.chir.rs/darkkirb/lotte-art
TARGET_DIR="$PWD"
function cleanup {
grep "fatal" $WORK_DIR/nix-prefetch-git.out >/dev/stderr || true
rm -rf "$WORK_DIR"
}
trap cleanup EXIT
echo "Fetching source code $REVISION from $URL"
JSON=$(nix-prefetch-git --url "$URL" --fetch-lfs 2> $WORK_DIR/nix-prefetch-git.out | grep -v "Git" | sed 's/"deepClone": false,/"deepClone": false/' )
REVISION=$(echo $JSON | jq -r .rev)
SHA=$(echo $JSON | jq -r .sha256)
cat > source.nix << EOF
{fetchgit}:
fetchgit {
url = "$URL";
rev = "$REVISION";
sha256 = "$SHA";
fetchLFS = true;
}
EOF

View file

@ -61,6 +61,7 @@
./fonts/kreative.nix
./fonts/nasin-nanpa.nix
./misc/plover.nix
./art
]);
hydraJobs =