additional to all fonts, provide a set with all fonts (fonts.all).
This commit is contained in:
parent
d1d9d39f45
commit
8960e7db51
3 changed files with 54 additions and 51 deletions
|
@ -4,7 +4,7 @@ with pkgs;
|
|||
stdenv.mkDerivation {
|
||||
name = "fonts-collection";
|
||||
nativeBuildInputs = [ coreutils ];
|
||||
srcs = [ fonts.fira_code ];# lib.attrsets.attrValues fonts;
|
||||
srcs = builtins.attrValues fonts.all;
|
||||
unpackPhase = " ";
|
||||
installPhase = ''
|
||||
mkdir -p "$out/share/"{fonts,doc}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# vim: set noet sw=2 ts=2 sts=2:
|
||||
{lib, pkgs, ...}:
|
||||
{src ? null , srcs ? null, name ? "", pname ? "", version ? ""}:
|
||||
({src ? null , srcs ? null, name ? "", pname ? "", version ? ""}:
|
||||
with pkgs;
|
||||
let
|
||||
name_ =
|
||||
|
@ -88,4 +88,4 @@ in stdenv.mkDerivation ({
|
|||
find "$source_dir" -name \*.html -exec cp \{\} $out/share/doc/${name_} \;
|
||||
find "$source_dir" -name \*.css -exec cp \{\} $out/share/doc/${name_} \;
|
||||
'';
|
||||
} // (if null != src then { src = src; } else { srcs = srcs; }))
|
||||
} // (if null != src then { src = src; } else { srcs = srcs; })))
|
||||
|
|
99
fonts.nix
99
fonts.nix
|
@ -3,52 +3,55 @@
|
|||
with pkgs;
|
||||
let
|
||||
github = path: "https://github.com/${path}";
|
||||
fonts = {
|
||||
libre_barcode =
|
||||
fetchfont rec {
|
||||
pname = "LibreBarcode";
|
||||
version = "1.008";
|
||||
src = fetchurl { name = "${pname}-${version}.zip"; hash = "sha256-47ntjMcZR4j5ybGU2UAA5t4FTPvyAvTiDSKYGEdRDQU="; url = github "graphicore/librebarcode/releases/download/v${version}/${pname}_v${version}.zip"; };
|
||||
};
|
||||
fira_code =
|
||||
fetchfont rec {
|
||||
pname = "FiraCode";
|
||||
version = "6.2";
|
||||
src = fetchurl { name = "${pname}-${version}.zip"; hash = "sha256-CUmRW6jrJNif2T0Qp/9iP0KDDXxf/D7L+WDk7K0+Pnk="; url = github "tonsky/FiraCode/releases/download/${version}/Fira_Code_v${version}.zip"; };
|
||||
};
|
||||
fira_mono =
|
||||
fetchfont rec {
|
||||
pname = "FiraMono";
|
||||
version = "4.202";
|
||||
src = fetchurl { name = "${pname}-${version}.tar.gz"; hash = "sha256-2GJpZXOH8UTXe6EgERJPMPQj9wZy4VdtwW+Ri7Ft3+Q="; url = github "mozilla/Fira/archive/refs/tags/${version}.tar.gz"; };
|
||||
};
|
||||
alegreya =
|
||||
fetchfont rec {
|
||||
pname = "Alegreya";
|
||||
version = "2.008";
|
||||
src = fetchurl { name = "${pname}-${version}.tar.gz"; hash = "sha256-RNrL48S2DCA7HWDwpV6/bBOYI/g/0jT5sHjs58sVZ24="; url = github "huertatipografica/${pname}/archive/refs/tags/v${version}.tar.gz"; };
|
||||
};
|
||||
alegreya_sans =
|
||||
fetchfont rec {
|
||||
pname = "Alegreya-Sans";
|
||||
version = "2.008";
|
||||
src = fetchurl { name = "${pname}-${version}.tar.gz"; hash = "sha256-6lRVctSeGOZ11rcqZ1TaNE4kucrMPSt2wesr+a5zpAI="; url = github "huertatipografica/${pname}/archive/refs/tags/v${version}.tar.gz"; };
|
||||
};
|
||||
inconsolata =
|
||||
fetchfont rec {
|
||||
pname = "Inconsolata";
|
||||
version = "3.000";
|
||||
src = fetchurl { name = "${pname}-${version}.tar.gz"; hash = "sha256-8tjYumyqeFqWbvF5loIqsUupHsQjQxop4bbEsUvEzaU="; url = github "googlefonts/${pname}/archive/refs/tags/v${version}.tar.gz"; };
|
||||
};
|
||||
rubik_dirt =
|
||||
fetchfont rec {
|
||||
pname = "RubikDirt";
|
||||
version = "2";
|
||||
srcs =
|
||||
let baseurl = github "NaN-xyz/Rubik-Filtered/raw/7f47b7f79f903e1d6af9883da43a84928e02b816/dirt/fonts";
|
||||
in [
|
||||
(fetchurl { name = "${pname}-Regular.ttf"; hash = "sha256-nePZKOQ0pH7IXXWQEsig6/6rCGAHbupOOYmkfF4hMSM="; url = "${baseurl}/ttf/${pname}-Regular.ttf"; })
|
||||
(fetchurl { name = "${pname}-Regular.woff2"; hash = "sha256-xh1jUaN5FRaU/omXT7U9T9Qhu+Cl/YddAJnSpgCOqYk="; url = "${baseurl}/webfonts/${pname}-Regular.woff2"; })
|
||||
];
|
||||
};
|
||||
};
|
||||
in {
|
||||
libre_barcode =
|
||||
fetchfont rec {
|
||||
pname = "LibreBarcode";
|
||||
version = "1.008";
|
||||
src = fetchurl { name = "${pname}-${version}.zip"; hash = "sha256-47ntjMcZR4j5ybGU2UAA5t4FTPvyAvTiDSKYGEdRDQU="; url = github "graphicore/librebarcode/releases/download/v${version}/${pname}_v${version}.zip"; };
|
||||
};
|
||||
fira_code =
|
||||
fetchfont rec {
|
||||
pname = "FiraCode";
|
||||
version = "6.2";
|
||||
src = fetchurl { name = "${pname}-${version}.zip"; hash = "sha256-CUmRW6jrJNif2T0Qp/9iP0KDDXxf/D7L+WDk7K0+Pnk="; url = github "tonsky/FiraCode/releases/download/${version}/Fira_Code_v${version}.zip"; };
|
||||
};
|
||||
fira_mono =
|
||||
fetchfont rec {
|
||||
pname = "FiraMono";
|
||||
version = "4.202";
|
||||
src = fetchurl { name = "${pname}-${version}.tar.gz"; hash = "sha256-2GJpZXOH8UTXe6EgERJPMPQj9wZy4VdtwW+Ri7Ft3+Q="; url = github "mozilla/Fira/archive/refs/tags/${version}.tar.gz"; };
|
||||
};
|
||||
alegreya =
|
||||
fetchfont rec {
|
||||
pname = "Alegreya";
|
||||
version = "2.008";
|
||||
src = fetchurl { name = "${pname}-${version}.tar.gz"; hash = "sha256-RNrL48S2DCA7HWDwpV6/bBOYI/g/0jT5sHjs58sVZ24="; url = github "huertatipografica/${pname}/archive/refs/tags/v${version}.tar.gz"; };
|
||||
};
|
||||
alegreya_sans =
|
||||
fetchfont rec {
|
||||
pname = "Alegreya-Sans";
|
||||
version = "2.008";
|
||||
src = fetchurl { name = "${pname}-${version}.tar.gz"; hash = "sha256-6lRVctSeGOZ11rcqZ1TaNE4kucrMPSt2wesr+a5zpAI="; url = github "huertatipografica/${pname}/archive/refs/tags/v${version}.tar.gz"; };
|
||||
};
|
||||
inconsolata =
|
||||
fetchfont rec {
|
||||
pname = "Inconsolata";
|
||||
version = "3.000";
|
||||
src = fetchurl { name = "${pname}-${version}.tar.gz"; hash = "sha256-8tjYumyqeFqWbvF5loIqsUupHsQjQxop4bbEsUvEzaU="; url = github "googlefonts/${pname}/archive/refs/tags/v${version}.tar.gz"; };
|
||||
};
|
||||
#rubik_dirt =
|
||||
# fetchfont rec {
|
||||
# pname = "RubikDirt";
|
||||
# version = "2";
|
||||
# srcs =
|
||||
# let baseurl = github "NaN-xyz/Rubik-Filtered/raw/7f47b7f79f903e1d6af9883da43a84928e02b816/dirt/fonts";
|
||||
# in [
|
||||
# (fetchurl { name = "${pname}-Regular.ttf"; hash = "sha256-nePZKOQ0pH7IXXWQEsig6/6rCGAHbupOOYmkfF4hMSM="; url = "${baseurl}/ttf/${pname}-Regular.ttf"; })
|
||||
# (fetchurl { name = "${pname}-Regular.woff2"; hash = "sha256-xh1jUaN5FRaU/omXT7U9T9Qhu+Cl/YddAJnSpgCOqYk="; url = "${baseurl}/webfonts/${pname}-Regular.woff2"; })
|
||||
# ];
|
||||
# };
|
||||
}
|
||||
all = fonts;
|
||||
} // fonts
|
||||
|
|
Loading…
Reference in a new issue