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

58 lines
1.3 KiB
Nix
Raw Normal View History

{
stdenv, lib,
fetchFromGitHub, fetchurl,
runCommand, writeText,
nodejs, ttfautohint, otfcc
}:
with lib;
let
installPackageLock = import ./package-lock.nix { inherit fetchurl lib; };
in
let
2017-08-27 20:19:47 +02:00
version = "1.13.3";
name = "iosevka-${version}";
src = fetchFromGitHub {
owner = "be5invis";
repo ="Iosevka";
rev = "v${version}";
sha256 = "0wfhfiahllq8ngn0mybvp29cfcm7b8ndk3fyhizd620wrj50bazf";
};
in
2015-12-17 10:26:57 +01:00
stdenv.mkDerivation {
inherit name version src;
nativeBuildInputs = [ nodejs ttfautohint otfcc ];
passAsFile = [ "installPackageLock" ];
installPackageLock = installPackageLock ./package-lock.json;
preConfigure = ''
HOME=$TMPDIR
source "$installPackageLockPath";
npm --offline rebuild
'';
2015-12-17 10:26:57 +01:00
installPhase = ''
fontdir=$out/share/fonts/iosevka
mkdir -p $fontdir
cp -v dist/iosevka*/ttf/*.ttf $fontdir
'';
2016-07-04 09:16:40 +02:00
meta = with stdenv.lib; {
homepage = https://be5invis.github.io/Iosevka/;
2015-12-17 10:26:57 +01:00
downloadPage = "https://github.com/be5invis/Iosevka/releases";
description = ''
Slender monospace sans-serif and slab-serif typeface inspired by Pragmata
Pro, M+ and PF DIN Mono, designed to be the ideal font for programming.
'';
license = licenses.ofl;
platforms = platforms.all;
maintainers = with maintainers; [ cstrahan jfrankenau ];
};
}