3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/data/fonts/nerdfonts/default.nix
2017-08-11 14:26:03 +00:00

41 lines
1.3 KiB
Nix

{ stdenv, fetchFromGitHub, bash, which, withFont ? "" }:
stdenv.mkDerivation rec {
version = "1.0.0";
name = "nerdfonts-${version}";
src = fetchFromGitHub {
owner = "ryanoasis";
repo = "nerd-fonts";
rev = version;
sha256 = "1kz4hhshi3lsaja20kg258jc220q1b6nhwiyv0w433m0kvsgzdqd";
};
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 ${withFont}
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "0bxna3llj6kf1rndvkw8w81blmgwy9l8kricynlf0l3mdd6li1f4";
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;
hydraPlatforms = []; # 'Output limit exceeded' on Hydra
};
}