summary refs log blame commit diff
path: root/pkgs/data/fonts/nerdfonts/default.nix
blob: 1f8d17509f7456e544af7f22431195a02e4c095b (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                                    
                                                                                                      

                   
                                      






                                                                                                                                                                                                                                                                                   
                                     

    
{ stdenv, fetchFromGitHub, bash, which }:

stdenv.mkDerivation rec {
  version = "0.7.0";
  name = "nerdfonts-${version}";
  src = fetchFromGitHub {
    owner = "ryanoasis";
    repo = "nerd-fonts";
    rev = version;
    sha256 = "0q2h8hpkbid8idi2kvzx5bnhyh65y51k02g7xpv3drjqj08cz7y0";
  };
  dontPatchShebangs = true;
  buildInputs = [ which ];
  patchPhase = ''
    sed -i -e 's|/bin/bash|${bash}/bin/bash|g' install.sh
    sed -i -e 's|font_dir="\$HOME/.local/share/fonts|font_dir="$out/share/fonts/truetype|g' install.sh
  '';
  installPhase = ''
    mkdir -p $out/share/fonts/truetype
    ./install.sh
  '';
  meta = with stdenv.lib; {
    description = "Nerd Fonts is a project that attempts to patch as many developer targeted and/or used fonts as possible. The patch is to specifically add a high number of additional glyphs from popular 'iconic fonts' such as Font Awesome, Devicons, Octicons, and others.";
    homepage = "https://github.com/ryanoasis/nerd-fonts";
    license = licenses.mit;
    maintainers = with maintainers; [ garbas ];
    platforms = with platforms; unix;
  };
}