9cb9e6509e
In commit e8e191a1be9d after v2.0.0, nerdfonts switched from #!/bin/bash to #!/usr/bin/env bash. Rather than synchronizing this patching with that change, just use patchShebangs which handles both cases.
35 lines
1.1 KiB
Nix
35 lines
1.1 KiB
Nix
{ stdenv, fetchFromGitHub, which, withFont ? "" }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
version = "2.0.0";
|
|
pname = "nerdfonts";
|
|
src = fetchFromGitHub {
|
|
owner = "ryanoasis";
|
|
repo = "nerd-fonts";
|
|
rev = version;
|
|
sha256 = "09i467hyskvzj2wn5sj6shvc9pb0a0rx5iknjkkkbg1ng3bla7nm";
|
|
};
|
|
dontPatchShebangs = true;
|
|
buildInputs = [ which ];
|
|
patchPhase = ''
|
|
patchShebangs 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}
|
|
'';
|
|
|
|
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; [ ];
|
|
hydraPlatforms = []; # 'Output limit exceeded' on Hydra
|
|
};
|
|
}
|