-
-
Save cole-h/5648c83fc6383aaf523ccd8a4d87e98d to your computer and use it in GitHub Desktop.
run node2nix --nodejs-12 in the same directory as iosveka-custom.nix and package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv | |
, lib | |
, pkgs | |
, fetchFromGitHub | |
, nodejs-12_x | |
, remarshal | |
, ttfautohint-nox | |
, otfcc | |
}: | |
let | |
outputHash = "1vskphw9gly96hxi1iwk37zhgpblpnn3nav2h7ff18dq3i3bd3gm"; | |
set = "custom"; | |
privateBuildPlan = { | |
hintParams = [ "-a" "sss" ]; | |
family = "Iosevka Custom"; | |
weights = { | |
thin = { | |
shape = 100; | |
menu = 100; | |
css = 100; | |
}; | |
extralight = { | |
shape = 200; | |
menu = 200; | |
css = 200; | |
}; | |
light = { | |
shape = 300; | |
menu = 300; | |
css = 300; | |
}; | |
regular = { | |
shape = 400; | |
menu = 400; | |
css = 400; | |
}; | |
book = { | |
shape = 450; | |
menu = 450; | |
css = 450; | |
}; | |
medium = { | |
shape = 500; | |
menu = 500; | |
css = 500; | |
}; | |
semibold = { | |
shape = 600; | |
menu = 600; | |
css = 600; | |
}; | |
bold = { | |
shape = 700; | |
menu = 700; | |
css = 700; | |
}; | |
extrabold = { | |
shape = 800; | |
menu = 800; | |
css = 800; | |
}; | |
heavy = { | |
shape = 900; | |
menu = 900; | |
css = 900; | |
}; | |
}; | |
slants = { | |
upright = "normal"; | |
italic = "italic"; | |
oblique = "oblique"; | |
}; | |
design = [ | |
"no-ligation" | |
"sp-term" | |
"v-a-doublestorey" | |
"v-asterisk-high" | |
"v-at-threefold" | |
"v-brace-curly" | |
"v-caret-high" | |
"v-dollar-through" | |
"v-eszet-sulzbacher" | |
"v-f-straight" | |
"v-g-singlestorey" | |
"v-i-serifed" | |
"v-lig-ltgteq-slanted" | |
"v-l-italic" | |
"v-m-shortleg" | |
"v-numbersign-slanted" | |
"v-one-base" | |
"v-paragraph-high" | |
"v-percent-dots" | |
"v-q-taily" | |
"v-three-flattop" | |
"v-tilde-low" | |
"v-t-standard" | |
"v-underscore-high" | |
"v-y-straight" | |
"v-zero-reverse-slashed" | |
]; | |
}; | |
buildDeps = (import ./. { }).package; | |
in | |
stdenv.mkDerivation rec { | |
pname = "iosevka-${set}"; | |
version = "3.0.1"; | |
src = fetchFromGitHub { | |
owner = "be5invis"; | |
repo = "Iosevka"; | |
rev = "v${version}"; | |
sha256 = "07w5k75v1zwnrxmp1fvp3mck99l6ch6ivaazddnhw4c408sb7zmm"; | |
}; | |
nativeBuildInputs = [ | |
nodejs-12_x | |
buildDeps | |
remarshal | |
otfcc | |
ttfautohint-nox | |
]; | |
privateBuildPlanJSON = builtins.toJSON { buildPlans.${pname} = privateBuildPlan; }; | |
passAsFile = [ "privateBuildPlanJSON" ]; | |
configurePhase = '' | |
${lib.optionalString (privateBuildPlan != null) '' | |
remarshal -i "$privateBuildPlanJSONPath" -o private-build-plans.toml -if json -of toml | |
''} | |
ln -s ${buildDeps}/lib/node_modules/iosevka/node_modules . | |
''; | |
buildPhase = '' | |
npm run build --no-update-notifier -- ttf::$pname | cat | |
''; | |
installPhase = '' | |
fontdir="$out/share/fonts/truetype" | |
install -d "$fontdir" | |
install "dist/$pname/ttf"/* "$fontdir" | |
''; | |
enableParallelBuilding = true; | |
inherit outputHash; | |
outputHashAlgo = "sha256"; | |
outputHashMode = "recursive"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "iosevka", | |
"version": "3.0.1", | |
"main": "./generate.js", | |
"engines": { | |
"node": ">=12.16.0" | |
}, | |
"scripts": { | |
"build": "verda -f verdafile.js" | |
}, | |
"dependencies": { | |
"caryll-shapeops": "^0.3.1", | |
"object-assign": "^4.1.1", | |
"otfcc-ttcize": "^0.10.0", | |
"typo-geom": "^0.5.1", | |
"spiro": "^1.1.0", | |
"toml": "^3.0.0", | |
"topsort": "^0.0.2", | |
"ttf2woff": "^2.0.1", | |
"ttf2woff2": "^3.0.0", | |
"unorm": "^1.6.0", | |
"verda": "^1.0.1", | |
"fs-extra": "^9.0.0", | |
"patel": "^0.33.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment