31 lines
755 B
Nix
31 lines
755 B
Nix
|
{ pkgs, ... }:
|
||
|
|
||
|
pkgs.stdenv.mkDerivation {
|
||
|
pname = "customfonts";
|
||
|
version = "1.0";
|
||
|
|
||
|
src = pkgs.fetchurl {
|
||
|
url = "https://www.coastalcommits.com/cswimr/fonts/archive/master.tar.gz";
|
||
|
sha256 = "sha256-XBRNu1DxjhfloJkQrFy4Wz4IUD6abhKcZKkX/snyxs4";
|
||
|
};
|
||
|
|
||
|
unpackPhase = ''
|
||
|
runHook preUnpack
|
||
|
${pkgs.gnutar}/bin/tar xf $src
|
||
|
|
||
|
runHook postUnpack
|
||
|
'';
|
||
|
|
||
|
installPhase = ''
|
||
|
runHook preInstall
|
||
|
|
||
|
install -Dm644 fonts/ttf/ComicCode/*.ttf -t $out/share/fonts/truetype
|
||
|
install -Dm644 fonts/otf/ComicCode/*.otf -t $out/share/fonts/opentype
|
||
|
|
||
|
install -Dm644 fonts/ttf/ComicCodeNerdFont/*.ttf -t $out/share/fonts/truetype
|
||
|
install -Dm644 fonts/otf/ComicCodeNerdFont/*.otf -t $out/share/fonts/opentype
|
||
|
|
||
|
runHook postInstall
|
||
|
'';
|
||
|
}
|