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

37 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, bash, which, withFont ? "" }:
2016-05-15 02:31:47 +00:00
stdenv.mkDerivation rec {
2017-08-31 08:26:06 +00:00
version = "1.1.0";
2016-05-15 02:31:47 +00:00
name = "nerdfonts-${version}";
src = fetchFromGitHub {
owner = "ryanoasis";
repo = "nerd-fonts";
rev = version;
2017-08-31 08:26:06 +00:00
sha256 = "0h12d33wnhs5w8r3h1gqil98442vf7a13ms3nwldsam4naapsqxz";
2016-05-15 02:31:47 +00:00
};
dontPatchShebangs = true;
buildInputs = [ which ];
patchPhase = ''
sed -i -e 's|/bin/bash|${bash}/bin/bash|g' install.sh
2016-05-16 23:52:49 +00:00
sed -i -e 's|font_dir="\$HOME/.local/share/fonts|font_dir="$out/share/fonts/truetype|g' install.sh
2016-05-15 02:31:47 +00:00
'';
installPhase = ''
2016-05-16 23:52:49 +00:00
mkdir -p $out/share/fonts/truetype
./install.sh ${withFont}
2016-05-15 02:31:47 +00:00
'';
2016-05-15 02:31:47 +00: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 02:31:47 +00:00
license = licenses.mit;
maintainers = with maintainers; [ garbas ];
platforms = with platforms; unix;
hydraPlatforms = []; # 'Output limit exceeded' on Hydra
2016-05-15 02:31:47 +00:00
};
}