forked from mirrors/nixpkgs
Merge pull request #179839 from DamienCassou/update-iosevka-comfy
This commit is contained in:
commit
28fe657e1f
|
@ -1,5 +1,5 @@
|
|||
# The file below is copy/pasted from
|
||||
# https://github.com/protesilaos/iosevka-comfy/blob/0.1.0/private-build-plans.toml. It
|
||||
# https://raw.githubusercontent.com/protesilaos/iosevka-comfy/0.2.1/private-build-plans.toml. It
|
||||
# seems like ofborg will prevent me from using fetchurl to download
|
||||
# this file automatically.
|
||||
[buildPlans.iosevka-comfy] # <iosevka-comfy> is your plan name
|
||||
|
@ -303,9 +303,19 @@ serifs = "sans"
|
|||
[buildPlans.iosevka-comfy-duo.variants]
|
||||
inherits = "buildPlans.iosevka-comfy"
|
||||
|
||||
# The short middle leg in 'm' that we need in the narrow monospaced
|
||||
# variants is necessary for legibility, especially at small point sizes.
|
||||
# Otherwise it is a gimmick, so we remove it in the "wider" builds.
|
||||
# The '0' has a forward slash that cuts diagonally through the middle of
|
||||
# the circle, connecting the bottom left part to the top right of the
|
||||
# oval shape. Whereas the narrow variants have a dashed forward slash
|
||||
# which does not connect the two sides as it is positioned inside the
|
||||
# oval shape.
|
||||
[buildPlans.iosevka-comfy-duo.variants.design]
|
||||
cv71 = 9 # 0 oval forward slash
|
||||
|
||||
# The 'm' character has three legs of equal length, insetad of a shorter
|
||||
# middle leg. The short middle leg in the narrow variants is necessary
|
||||
# for legibility, especially at small point sizes (otherwise the
|
||||
# character's legs visually blend into what appears to be a solid
|
||||
# block).
|
||||
[buildPlans.iosevka-comfy-duo.variants.upright]
|
||||
cv38 = 5 # m earless normal middle leg
|
||||
|
||||
|
@ -371,9 +381,19 @@ serifs = "sans"
|
|||
[buildPlans.iosevka-comfy-wide.variants]
|
||||
inherits = "buildPlans.iosevka-comfy"
|
||||
|
||||
# The short middle leg in 'm' that we need in the narrow monospaced
|
||||
# variants is necessary for legibility, especially at small point sizes.
|
||||
# Otherwise it is a gimmick, so we remove it in the "wider" builds.
|
||||
# The '0' has a forward slash that cuts diagonally through the middle of
|
||||
# the circle, connecting the bottom left part to the top right of the
|
||||
# oval shape. Whereas the narrow variants have a dashed forward slash
|
||||
# which does not connect the two sides as it is positioned inside the
|
||||
# oval shape.
|
||||
[buildPlans.iosevka-comfy-wide.variants.design]
|
||||
cv71 = 9 # 0 oval forward slash
|
||||
|
||||
# The 'm' character has three legs of equal length, insetad of a shorter
|
||||
# middle leg. The short middle leg in the narrow variants is necessary
|
||||
# for legibility, especially at small point sizes (otherwise the
|
||||
# character's legs visually blend into what appears to be a solid
|
||||
# block).
|
||||
[buildPlans.iosevka-comfy-wide.variants.upright]
|
||||
cv38 = 5 # m earless normal middle leg
|
||||
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
{stdenv, lib, nodejs, nodePackages, remarshal, ttfautohint-nox, fetchurl}:
|
||||
|
||||
let
|
||||
sets = [ "comfy" "comfy-duo" "comfy-wide" "comfy-wide-fixed"];
|
||||
sets = [ "comfy" "comfy-fixed" "comfy-duo" "comfy-wide" "comfy-wide-fixed" ];
|
||||
privateBuildPlan = builtins.readFile ./comfy-private-build-plans.toml;
|
||||
overrideAttrs = (attrs: {
|
||||
version = "0.1.0";
|
||||
version = "0.2.1";
|
||||
|
||||
passthru = {
|
||||
updateScript = ./update-comfy.sh;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/protesilaos/iosevka-comfy";
|
||||
description = ''
|
||||
|
|
33
pkgs/data/fonts/iosevka/update-comfy.sh
Executable file
33
pkgs/data/fonts/iosevka/update-comfy.sh
Executable file
|
@ -0,0 +1,33 @@
|
|||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p curl jq
|
||||
|
||||
set -euo pipefail
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
repo=protesilaos/iosevka-comfy
|
||||
oldVersion=$(nix-instantiate --eval -E 'with import ../../../.. {}; lib.getVersion iosevka-comfy.comfy' | tr -d \")
|
||||
version=$(curl -s https://api.github.com/repos/$repo/tags | jq '.[0].name' | tr -d \")
|
||||
buildPlansUrl=https://raw.githubusercontent.com/$repo/$(echo $version)/private-build-plans.toml
|
||||
|
||||
if test "$oldVersion" = "$version"; then
|
||||
echo "New version same as old version, nothing to do." >&2
|
||||
exit 0
|
||||
fi
|
||||
|
||||
sed --in-place "s/$oldVersion/$version/" comfy.nix
|
||||
|
||||
cat > ./comfy-private-build-plans.toml <<EOF
|
||||
# The file below is copy/pasted from
|
||||
# $buildPlansUrl. It
|
||||
# seems like ofborg will prevent me from using fetchurl to download
|
||||
# this file automatically.
|
||||
EOF
|
||||
|
||||
wget --quiet --output-document=- "$buildPlansUrl" >> ./comfy-private-build-plans.toml
|
||||
|
||||
sets=$(grep '^\[buildPlans\.iosevka-comfy[^.]*\]' comfy-private-build-plans.toml \
|
||||
| sed 's/^.*iosevka-\(comfy[^]]*\)].*$/"\1" /' \
|
||||
| tr -d '\n' \
|
||||
| sort)
|
||||
|
||||
sed --in-place "s/sets = .*$/sets = [ $sets];/" comfy.nix
|
Loading…
Reference in a new issue