add customfonts
custom package
This commit is contained in:
parent
1a85ad210f
commit
9a12e1f7bb
2 changed files with 32 additions and 0 deletions
|
@ -21,6 +21,7 @@ let
|
|||
libnotify
|
||||
hoppscotch
|
||||
];
|
||||
customfonts = pkgs.callPackage ../packages/customfonts.nix { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
environment.systemPackages = lib.lists.unique (kdePackages ++ packages);
|
||||
|
@ -44,6 +45,7 @@ in
|
|||
programs.partition-manager.enable = true;
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
customfonts
|
||||
corefonts
|
||||
nerd-fonts.fira-code
|
||||
];
|
||||
|
|
30
packages/customfonts.nix
Normal file
30
packages/customfonts.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ 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
|
||||
'';
|
||||
}
|
Loading…
Reference in a new issue