2016-08-12 14:21:27 +02:00
|
|
|
{ stdenv, fetchFromGitHub, bash, which, withFont ? "" }:
|
2016-05-15 04:31:47 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-04-06 15:54:34 +02:00
|
|
|
version = "2.0.0";
|
2016-05-15 04:31:47 +02:00
|
|
|
name = "nerdfonts-${version}";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ryanoasis";
|
|
|
|
repo = "nerd-fonts";
|
|
|
|
rev = version;
|
2018-04-06 15:54:34 +02:00
|
|
|
sha256 = "09i467hyskvzj2wn5sj6shvc9pb0a0rx5iknjkkkbg1ng3bla7nm";
|
2016-05-15 04:31:47 +02:00
|
|
|
};
|
|
|
|
dontPatchShebangs = true;
|
|
|
|
buildInputs = [ which ];
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i -e 's|/bin/bash|${bash}/bin/bash|g' 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
|
2016-08-12 14:21:27 +02:00
|
|
|
./install.sh ${withFont}
|
2016-05-15 04:31:47 +02:00
|
|
|
'';
|
2016-09-01 18:49:20 +02:00
|
|
|
|
2016-05-15 04:31:47 +02:00
|
|
|
meta = with stdenv.lib; {
|
2016-09-01 18:49:20 +02:00
|
|
|
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.
|
|
|
|
'';
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = https://github.com/ryanoasis/nerd-fonts;
|
2016-05-15 04:31:47 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ garbas ];
|
2016-08-02 19:50:55 +02:00
|
|
|
platforms = with platforms; unix;
|
2016-09-01 18:49:20 +02:00
|
|
|
hydraPlatforms = []; # 'Output limit exceeded' on Hydra
|
2016-05-15 04:31:47 +02:00
|
|
|
};
|
|
|
|
}
|