fira: migrate to by-name, refactor

This commit is contained in:
Weijia Wang 2024-01-07 20:38:01 +01:00
parent 81b35a5dbe
commit 4d22cc500f
3 changed files with 23 additions and 39 deletions

View File

@ -0,0 +1,23 @@
{ lib
, symlinkJoin
, fira-mono
, fira-sans
}:
symlinkJoin rec {
pname = "fira";
inherit (fira-mono) version;
name = "${pname}-${version}";
paths = [
fira-mono
fira-sans
];
meta = {
description = "Fira font family including Fira Sans and Fira Mono";
homepage = "https://mozilla.github.io/Fira/";
license = lib.licenses.ofl;
platforms = lib.platforms.all;
};
}

View File

@ -1,37 +0,0 @@
{ lib, stdenvNoCC, fetchFromGitHub }:
stdenvNoCC.mkDerivation rec {
pname = "fira";
version = "4.202";
src = fetchFromGitHub {
owner = "mozilla";
repo = "Fira";
rev = version;
hash = "sha256-HLReqgL0PXF5vOpwLN0GiRwnzkjGkEVEyOEV2Z4R0oQ=";
};
installPhase = ''
runHook preInstall
install --mode=-x -Dt $out/share/fonts/opentype otf/*.otf
runHook postInstall
'';
meta = with lib; {
homepage = "https://mozilla.github.io/Fira/";
description = "Sans-serif font for Firefox OS";
longDescription = ''
Fira Sans is a sans-serif font designed by Erik Spiekermann,
Ralph du Carrois, Anja Meiners and Botio Nikoltchev of Carrois
Type Design for Mozilla Firefox OS. It is closely related to
Spiekermann's FF Meta typeface. Available in Two, Four, Eight,
Hair, Thin, Ultra Light, Extra Light, Light, Book, Regular,
Medium, Semi Bold, Bold, Extra Bold, Heavy weights with
corresponding italic versions.
'';
license = licenses.ofl;
platforms = platforms.all;
};
}

View File

@ -29312,8 +29312,6 @@ with pkgs;
fanwood = callPackage ../data/fonts/fanwood { };
fira = callPackage ../data/fonts/fira { };
fira-code = callPackage ../data/fonts/fira-code { };
fira-code-symbols = callPackage ../data/fonts/fira-code/symbols.nix { };
fira-code-nerdfont = nerdfonts.override {