default.nix 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # This file has been initially generated by node2nix 1.9.0.
  2. { pkgs, stdenv, lib, nodejs, ttfautohint-nox }:
  3. let
  4. nodeEnv = import ./node-env.nix {
  5. inherit (pkgs) stdenv lib python2 runCommand writeTextFile;
  6. inherit pkgs nodejs;
  7. libtool = null;
  8. };
  9. nodePackages = import ./node-packages.nix {
  10. inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
  11. inherit nodeEnv;
  12. };
  13. nodeIosevka = nodePackages.package;
  14. in
  15. stdenv.mkDerivation rec {
  16. pname = "iosevka-custom";
  17. inherit (nodeIosevka) version src;
  18. nativeBuildInputs = [ nodejs nodeIosevka ttfautohint-nox ];
  19. buildPlan = builtins.readFile ../../../iosevka/private-build-plans.toml;
  20. passAsFile = [ "buildPlan" ];
  21. configurePhase = ''
  22. runHook preConfigure
  23. cp "$buildPlanPath" private-build-plans.toml
  24. ln -s ${nodeIosevka}/lib/node_modules/iosevka/node_modules .
  25. runHook postConfigure
  26. '';
  27. buildPhase = ''
  28. runHook preBuild
  29. npm run build --no-update-notifier -- --jCmd=$NIX_BUILD_CORES ttf::$pname
  30. runHook postBuild
  31. '';
  32. installPhase = ''
  33. runHook preInstall
  34. fontdir="$out/share/fonts/truetype"
  35. install -d "$fontdir"
  36. install "dist/$pname/ttf"/* "$fontdir"
  37. runHook postInstall
  38. '';
  39. meta = with lib; {
  40. description = ''
  41. Slender monospace sans-serif and slab-serif typeface inspired by Pragmata
  42. Pro, M+ and PF DIN Mono, designed to be the ideal font for programming.
  43. '';
  44. homepage = "https://be5invis.github.io/Iosevka";
  45. license = licenses.ofl;
  46. maintainers = with maintainers; [ vyp ];
  47. platforms = platforms.linux;
  48. };
  49. }