Last active
September 6, 2020 17:02
-
-
Save worldofpeace/d546167739cb41d87f965c9a81e78530 to your computer and use it in GitHub Desktop.
Nix Expression for FiraCode nerdfont
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, fetchzip }: | |
let | |
pname = "FiraCode"; | |
version = "v2.0.0"; | |
in | |
stdenv.mkDerivation rec { | |
name = "${pname}-nerdfont-${version}"; | |
src = fetchzip { | |
url = "https://github.com/ryanoasis/nerd-fonts/releases/download/${version}/${pname}.zip"; | |
sha256 = "1bnai3k3hg6sxbb1646ahd82dm2ngraclqhdygxhh7fqqnvc3hdy"; | |
stripRoot = false; | |
}; | |
buildCommand = '' | |
install --target $out/share/fonts/opentype -D $src/*.otf | |
''; | |
meta = with stdenv.lib; { | |
description = "Nerdfont version of Fira Code"; | |
homepage = https://github.com/ryanoasis/nerd-fonts; | |
license = licenses.mit; | |
}; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tried
(nerdfonts.override { fonts = [ "FiraCode" ]; })
but that just gives meEdit:
Ah I see, it's
nerdfonts.override { withFont = "FiraCode"; })
, now.Oh god, that downloads a 2 GB file, rather than the specialized release files for the respective font!