iosevka: fix build

This commit is contained in:
Winter 2022-08-13 23:09:06 -04:00
parent 433dcfc215
commit 83519fe976
3 changed files with 2728 additions and 10 deletions

View file

@ -1,4 +1,4 @@
{ stdenv, lib, nodejs, nodePackages, remarshal
{ stdenv, lib, pkgs, fetchFromGitHub, nodejs, remarshal
, ttfautohint-nox
# Custom font set options.
# See https://typeof.net/Iosevka/customizer
@ -55,13 +55,18 @@ let
#
# Doing it this way ensures that the package can always be built,
# although possibly an older version than ioseva-bin.
nodeIosevka = (
lib.findSingle
(drv: drv ? packageName && drv.packageName == "iosevka")
(throw "no 'iosevka' package found in nodePackages")
(throw "multiple 'iosevka' packages found in nodePackages")
(lib.attrValues nodePackages)
).override (drv: { dontNpmInstall = true; });
nodeIosevka = (import ./node-composition.nix {
inherit pkgs nodejs;
inherit (stdenv.hostPlatform) system;
}).package.override {
src = fetchFromGitHub {
owner = "be5invis";
repo = "Iosevka";
rev = "v15.6.3";
hash = "sha256-wsFx5sD1CjQTcmwpLSt97OYFI8GtVH54uvKQLU1fWTg=";
};
};
in
stdenv.mkDerivation rec {
pname = if set != null then "iosevka-${set}" else "iosevka";
@ -69,7 +74,6 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
nodejs
nodeIosevka
remarshal
ttfautohint-nox
];
@ -108,7 +112,7 @@ stdenv.mkDerivation rec {
buildPhase = ''
export HOME=$TMPDIR
runHook preBuild
npm run build --no-update-notifier -- --jCmd=$NIX_BUILD_CORES ttf::$pname >/dev/null
npm run build --no-update-notifier -- --jCmd=$NIX_BUILD_CORES --verbose=9 ttf::$pname
runHook postBuild
'';

View file

@ -0,0 +1,17 @@
# This file has been generated by node2nix 1.11.1. Do not edit!
{pkgs ? import <nixpkgs> {
inherit system;
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-16_x"}:
let
nodeEnv = import ../../../development/node-packages/node-env.nix {
inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript;
inherit pkgs nodejs;
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
};
in
import ./node-packages.nix {
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
inherit nodeEnv;
}

2697
pkgs/data/fonts/iosevka/node-packages.nix generated Normal file

File diff suppressed because it is too large Load diff