1 #!/usr/bin/env nix-shell
2 #! nix-shell -i bash -p common-updater-scripts git nix-prefetch
6 git
-C "$tmpdir" init
--initial-branch main
7 git
-C "$tmpdir" config core.sparseCheckout true
8 git
-C "$tmpdir" remote add origin https
://github.com
/google
/fonts.git
9 echo "ofl/notoemoji/*" > "$tmpdir/.git/info/sparse-checkout"
10 git
-C "$tmpdir" fetch origin main
11 git
-C "$tmpdir" checkout main
13 newrev
=$
(git
-C "$tmpdir" rev-list
-1 HEAD
"ofl/notoemoji/*.ttf")
14 newver
=$
(grep 'archive:' "$tmpdir/ofl/notoemoji/upstream.yaml" |
grep -oP '(?<=v)[0-9]+\.[0-9]+')
15 newhash
=$
(nix-prefetch
"{ stdenv, fetchurl }: stdenv.mkDerivation rec {
16 name = \"noto-fonts-cjk-serif\";
17 src = fetchFromGitHub {
21 sparseCheckout = [ \"ofl/notoemoji\" ];
25 update-source-version noto-fonts-monochrome-emoji
"$newver" "$newhash" --rev="$newrev"