diff options
author | Vladimír Čunát <v@cunat.cz> | 2020-10-31 14:30:44 +0100 |
---|---|---|
committer | Vladimír Čunát <v@cunat.cz> | 2020-10-31 14:30:44 +0100 |
commit | dfd3ede68d58e3f992a0e3befbc820bd931c3437 (patch) | |
tree | 971ae40cf6b50b92a3fef8580c703d9d87b3d088 /pkgs/data | |
parent | 9c5154b5aaee073eeca7f94359d69c93d4dbf5b3 (diff) | |
parent | 680d3201230c7864755bff80fcdef30d7487500a (diff) |
Merge branch 'master' into staging-next
Diffstat (limited to 'pkgs/data')
-rw-r--r-- | pkgs/data/fonts/iosevka/bin.nix | 37 | ||||
-rwxr-xr-x | pkgs/data/fonts/iosevka/update.sh | 28 | ||||
-rw-r--r-- | pkgs/data/fonts/iosevka/variants.nix | 24 | ||||
-rw-r--r-- | pkgs/data/fonts/merriweather/default.nix | 2 | ||||
-rw-r--r-- | pkgs/data/themes/matcha/default.nix | 4 |
5 files changed, 82 insertions, 13 deletions
diff --git a/pkgs/data/fonts/iosevka/bin.nix b/pkgs/data/fonts/iosevka/bin.nix index 0f88aa05e4cf..c3e77c1051fb 100644 --- a/pkgs/data/fonts/iosevka/bin.nix +++ b/pkgs/data/fonts/iosevka/bin.nix @@ -1,20 +1,35 @@ -{ stdenv, fetchzip }: +{ stdenv, lib, fetchurl, unzip +, variant ? "" +}: let - version = "3.4.6"; -in fetchzip { - name = "iosevka-bin-${version}"; + name = "iosevka" + lib.optionalString (variant != "") "-" + variant; - url = "https://github.com/be5invis/Iosevka/releases/download/v${version}/ttc-iosevka-${version}.zip"; + variantHashes = import ./variants.nix; + validVariants = map (lib.removePrefix "iosevka-") + (builtins.attrNames (builtins.removeAttrs variantHashes [ "iosevka" ])); +in stdenv.mkDerivation rec { + pname = "${name}-bin"; + version = "3.7.1"; - postFetch = '' + src = fetchurl { + url = "https://github.com/be5invis/Iosevka/releases/download/v${version}/ttc-${name}-${version}.zip"; + sha256 = variantHashes.${name} or (throw '' + No such variant "${variant}" for package iosevka-bin. + Valid variants are: ${lib.concatStringsSep ", " validVariants}. + ''); + }; + + nativeBuildInputs = [ unzip ]; + + phases = [ "unpackPhase" ]; + + unpackPhase = '' mkdir -p $out/share/fonts - unzip -j $downloadedFile \*.ttc -d $out/share/fonts/truetype + unzip -d $out/share/fonts/truetype $src ''; - sha256 = "1nab49gkpxahwvvw39xcc32q425qkccr7ffmz87jbcdv71qy7pp9"; - - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://be5invis.github.io/Iosevka/"; downloadPage = "https://github.com/be5invis/Iosevka/releases"; description = '' @@ -25,4 +40,6 @@ in fetchzip { platforms = platforms.all; maintainers = [ maintainers.cstrahan ]; }; + + passthru.updateScript = ./update.sh; } diff --git a/pkgs/data/fonts/iosevka/update.sh b/pkgs/data/fonts/iosevka/update.sh new file mode 100755 index 000000000000..df78c62a6ce8 --- /dev/null +++ b/pkgs/data/fonts/iosevka/update.sh @@ -0,0 +1,28 @@ +#! /usr/bin/env nix-shell +#! nix-shell -i bash -p curl jq + +set -e + +release=$(curl -s https://api.github.com/repos/be5invis/Iosevka/releases/latest) + +oldVersion=$(nix-instantiate --eval -E 'with import ./. {}; lib.getVersion iosevka-bin' | tr -d '"') +version=$(echo "$release" | jq -r .tag_name | tr -d v) + +if test "$oldVersion" = "$version"; then + echo "New version same as old version, nothing to do." >&2 + exit 0 +fi + +file=$(nix-instantiate --eval -A iosevka-bin.meta.position | sed -r 's/^"(.*):[0-9]+"$/\1/') +sed -i "s/$oldVersion/$version/" "$file" + +{ + echo '# This file was autogenerated. DO NOT EDIT!' + echo '{' + for asset in $(echo "$release" | jq -r '.assets[].name | select(startswith("ttc"))'); do + printf ' %s = "%s";\n' \ + $(echo "$asset" | sed -r "s/^ttc-(.*)-$version.zip$/\1/") \ + $(nix-prefetch-url "https://github.com/be5invis/Iosevka/releases/download/v$version/$asset") + done + echo '}' +} >$(dirname "$file")/variants.nix diff --git a/pkgs/data/fonts/iosevka/variants.nix b/pkgs/data/fonts/iosevka/variants.nix new file mode 100644 index 000000000000..b3fd986c4caf --- /dev/null +++ b/pkgs/data/fonts/iosevka/variants.nix @@ -0,0 +1,24 @@ +# This file was autogenerated. DO NOT EDIT! +{ + iosevka = "0h226f32nwlqnsdc86bwk2wcdl2hsq5q1s2ln6dsf9m7w8ajn0nr"; + iosevka-aile = "05k3h7n7mkpdsjcxha27vjj503b4129jd90wj8qyk5h0nrgy1rc6"; + iosevka-curly = "0fxcc99n9ghkdjmfxba9mg4fc0dwlvnnxlmc618jv6s3k2xn7sza"; + iosevka-curly-slab = "1qgxyw5v91l4cw3mvqzagk9amyy63iqh72bnsz63daxgss3fpsab"; + iosevka-etoile = "184rjidnjayv5wsrxxxf39mvdcjafdwcvp0h4rfniy9s0ifrwjvf"; + iosevka-slab = "1cbrv5pyhnvwrdaj8r011igw2yjgzzigd82g1r10d348lk64wja1"; + iosevka-sparkle = "124jnjzffnfw58b78svw8rzgal10z5nspwc267pvq7q0f2ak1wpp"; + iosevka-ss01 = "18ckb0ch4za4vgwqz8azx8vhg9v9a922ffbckrbmy8n5bi03dl7w"; + iosevka-ss02 = "0cwm2jdni5m9z0xagpmq9vvjp3yvin7c7bnavsj15yfvpq8b8qsp"; + iosevka-ss03 = "1yzbvkr726f8mm024qzy2hdd7nz4kymgjm0cj5208c57bln0byr2"; + iosevka-ss04 = "1kpz84a1cb39rxc87whw0fh0k9ak2qbcq59hm425da2acf27a648"; + iosevka-ss05 = "1xnnm96jnw90mhwylsw1ad6m8pr4r1bd02l7g82m5hmr7bc4b7dd"; + iosevka-ss06 = "1raw01ijiawaqxfmj0m8z8jrb2ns7vzy68lak63mss8j35xzg1l5"; + iosevka-ss07 = "0bjhjwjif7qw6wyyrzfg2pdvy1b070k053ndmjard6sh1rcln02d"; + iosevka-ss08 = "1qwgk8riff57np4hlmd0kcl9bx511x9zmnlrjq3ilfn6abdwgm7i"; + iosevka-ss09 = "0sfnhmcrsv1v7l756hx70y1mrp35fbs6wrsczw4vxfbbaigs767r"; + iosevka-ss10 = "10n70z7588h8y2z274vjn6hvzc7lg87znibcmkk2brmx2g5bw2wl"; + iosevka-ss11 = "0mnyd04vdqr8jm3syv6ddrn61f27k91kxkdy86pp34xaac2ipmm0"; + iosevka-ss12 = "1f8pn2220s6r566b40ncnqrfmfdhnlr0nkvzj9swgvx66jr8mlhj"; + iosevka-ss13 = "1py5qgfqm9wp9pzcxg83mydvf3r6nhrqi21d0fvmnk04ghk1psd6"; + iosevka-ss14 = "0z47kqicd26x5v94zy97xyl277v0s6856pbllfn1gv92ax2dg5cy"; +} diff --git a/pkgs/data/fonts/merriweather/default.nix b/pkgs/data/fonts/merriweather/default.nix index 1768c44bc03c..d1b3359df26e 100644 --- a/pkgs/data/fonts/merriweather/default.nix +++ b/pkgs/data/fonts/merriweather/default.nix @@ -27,7 +27,7 @@ stdenvNoCC.mkDerivation rec { meta = with lib; { homepage = "https://github.com/SorkinType/Merriweather"; - description = "Merriweather was designed to be a text face that is pleasant to read on screens"; + description = "A text face designed to be pleasant to read on screens"; license = licenses.ofl; platforms = platforms.all; maintainers = with maintainers; [ emily ]; diff --git a/pkgs/data/themes/matcha/default.nix b/pkgs/data/themes/matcha/default.nix index bc0776695501..7ed6acb2800e 100644 --- a/pkgs/data/themes/matcha/default.nix +++ b/pkgs/data/themes/matcha/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "matcha-gtk-theme"; - version = "2020-10-05"; + version = "2020-10-23"; src = fetchFromGitHub { owner = "vinceliuice"; repo = pname; rev = version; - sha256 = "0pkgpipffwxphn16p6r911mbhqhjyk60svirxzm2phlhxl0ddwpj"; + sha256 = "125wcvr457lbs8zxp8r18q7gzagp0wbg518iynzmbax8gsjds8w3"; }; buildInputs = [ gdk-pixbuf librsvg ]; |