nixpkgs-suyu/pkgs/data/fonts/nerdfonts/default.nix

36 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, which, withFont ? "" }:
2016-05-15 04:31:47 +02:00
stdenv.mkDerivation rec {
version = "2.1.0";
pname = "nerdfonts";
2016-05-15 04:31:47 +02:00
src = fetchFromGitHub {
owner = "ryanoasis";
repo = "nerd-fonts";
rev = version;
sha256 = "1la79y16k9rwcl2zsxk73c0kgdms2ma43kpjfqnq5jlbfdj0niwg";
2016-05-15 04:31:47 +02:00
};
dontPatchShebangs = true;
buildInputs = [ which ];
patchPhase = ''
patchShebangs install.sh
2016-05-17 01:52:49 +02:00
sed -i -e 's|font_dir="\$HOME/.local/share/fonts|font_dir="$out/share/fonts/truetype|g' install.sh
2016-05-15 04:31:47 +02:00
'';
installPhase = ''
2016-05-17 01:52:49 +02:00
mkdir -p $out/share/fonts/truetype
./install.sh ${withFont}
2016-05-15 04:31:47 +02:00
'';
2016-05-15 04:31:47 +02:00
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;
2016-05-15 04:31:47 +02:00
license = licenses.mit;
maintainers = with maintainers; [ ];
hydraPlatforms = []; # 'Output limit exceeded' on Hydra
2016-05-15 04:31:47 +02:00
};
}