You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

default.nix 1.1KB

1234567891011121314151617181920212223242526272829303132333435
  1. { stdenv, fetchFromGitHub, which, withFont ? "" }:
  2. stdenv.mkDerivation rec {
  3. version = "2.0.0";
  4. pname = "nerdfonts";
  5. src = fetchFromGitHub {
  6. owner = "ryanoasis";
  7. repo = "nerd-fonts";
  8. rev = version;
  9. sha256 = "09i467hyskvzj2wn5sj6shvc9pb0a0rx5iknjkkkbg1ng3bla7nm";
  10. };
  11. dontPatchShebangs = true;
  12. buildInputs = [ which ];
  13. patchPhase = ''
  14. patchShebangs install.sh
  15. sed -i -e 's|font_dir="\$HOME/.local/share/fonts|font_dir="$out/share/fonts/truetype|g' install.sh
  16. '';
  17. installPhase = ''
  18. mkdir -p $out/share/fonts/truetype
  19. ./install.sh ${withFont}
  20. '';
  21. meta = with stdenv.lib; {
  22. description = ''
  23. Nerd Fonts is a project that attempts to patch as many developer targeted
  24. and/or used fonts as possible. The patch is to specifically add a high
  25. number of additional glyphs from popular 'iconic fonts' such as Font
  26. Awesome, Devicons, Octicons, and others.
  27. '';
  28. homepage = https://github.com/ryanoasis/nerd-fonts;
  29. license = licenses.mit;
  30. maintainers = with maintainers; [ ];
  31. hydraPlatforms = []; # 'Output limit exceeded' on Hydra
  32. };
  33. }