51 lines
1.2 KiB
Nix
51 lines
1.2 KiB
Nix
with import <nixpkgs> { };
|
|
|
|
let
|
|
packages = [ nodejs ttfautohint ] ++ # Build.
|
|
[ wget unzip ] ++ # Download the patch.
|
|
[ python3 fontforge ]; # Patch.
|
|
in
|
|
|
|
mkShell {
|
|
buildInputs = packages;
|
|
shellHook = ''
|
|
set -euo pipefail
|
|
|
|
# Clean it.
|
|
rm -rf ~/.local/share/fonts
|
|
|
|
# Build it.
|
|
git clone --depth 1 https://github.com/be5invis/Iosevka.git
|
|
cp ./private-build-plans.toml Iosevka/
|
|
cd Iosevka
|
|
|
|
npm install
|
|
npm run build -- ttf-unhinted::Atlas
|
|
|
|
cp -r dist/Atlas ../
|
|
cd ..
|
|
|
|
# Patch it.
|
|
mkdir patch
|
|
cd patch
|
|
|
|
wget https://github.com/ryanoasis/nerd-fonts/releases/latest/download/FontPatcher.zip
|
|
unzip FontPatcher.zip
|
|
|
|
for filename in ../Atlas/TTF-Unhinted/*; do
|
|
./font-patcher -o ../atlas-font -l --fontawesome --fontawesomeext \
|
|
--fontlogos --octicons --codicons --powersymbols \
|
|
--pomicons --powerline --powerlineextra \
|
|
--material --weather $filename
|
|
done
|
|
|
|
# Send it.
|
|
cd ..
|
|
rm -rf Atlas Iosevka patch
|
|
mv atlas-font ~/.local/share/fonts
|
|
fc-cache -fv
|
|
|
|
exit
|
|
'';
|
|
}
|