add lotte-art
This commit is contained in:
parent
a8eb1c21c0
commit
4905db1a7f
5 changed files with 40 additions and 0 deletions
2
.github/workflows/update-flake.yaml
vendored
2
.github/workflows/update-flake.yaml
vendored
|
@ -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
3
art/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{pkgs, ...}: {
|
||||
lotte-art = pkgs.callPackage ./source.nix {};
|
||||
}
|
7
art/source.nix
Normal file
7
art/source.nix
Normal 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
27
art/update.sh
Executable 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
|
|
@ -61,6 +61,7 @@
|
|||
./fonts/kreative.nix
|
||||
./fonts/nasin-nanpa.nix
|
||||
./misc/plover.nix
|
||||
./art
|
||||
]);
|
||||
|
||||
hydraJobs =
|
||||
|
|
Reference in a new issue