From 3988344231d9f814b2689fb55b1d7ec1351287e4 Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Mon, 15 Jun 2020 19:43:58 +0200 Subject: [PATCH] mesloNFp10k --- default.nix | 2 ++ pkgs/fonts/MesloNFp10k.nix | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/fonts/MesloNFp10k.nix diff --git a/default.nix b/default.nix index 0e0b03d..8cc601b 100644 --- a/default.nix +++ b/default.nix @@ -32,5 +32,7 @@ botamusique = pkgs.callPackage ./pkgs/botamusique { }; + mesloNFp10k = pkgs.callPackage ./pkgs/fonts/MesloNFp10k.nix { }; + } diff --git a/pkgs/fonts/MesloNFp10k.nix b/pkgs/fonts/MesloNFp10k.nix new file mode 100644 index 0000000..380d153 --- /dev/null +++ b/pkgs/fonts/MesloNFp10k.nix @@ -0,0 +1,30 @@ +{ runCommand, fetchurl }: + +let + commit = "54fbc18ea84d15807f921146c1689539b62a6061"; + regular = fetchurl { + name = "MesloLGSNFRegular.ttf"; + url = "https://github.com/romkatv/powerlevel10k-media/raw/${commit}/MesloLGS%20NF%20Regular.ttf"; + sha256 = "1jydmjlhssvmj0ddy7vzn0cp6wkdjk32lvxq64wrgap8q9xy14li"; + }; + bold = fetchurl { + name = "MesloLGSNFBold.ttf"; + url = "https://github.com/romkatv/powerlevel10k-media/raw/${commit}/MesloLGS%20NF%20Bold.ttf"; + sha256 = "0w9byh20804qscsj13wj9v3llaqqzbkg5dmpwf0yqmxcvgs8dp7b"; + }; + italic = fetchurl { + name = "MesloLGSNFItalic.ttf"; + url = "https://github.com/romkatv/powerlevel10k-media/raw/${commit}/MesloLGS%20NF%20Italic.ttf"; + sha256 = "1442jp3zh92fz7fs5xn4853djnbchkqj7i09avnhpgp9bbn07fzz"; + }; + boldItalic = fetchurl { + name = "MesloLGSNFBoldItalic.ttf"; + url = "https://github.com/romkatv/powerlevel10k-media/raw/${commit}/MesloLGS%20NF%20Bold%20Italic.ttf"; + sha256 = "0g5q6my8k6aaf26sq610v9v17j3gsba63f1wv2yix48sdj3pxvbz"; + }; +in +runCommand "meslo-NF-p10k" {} + '' + mkdir -p $out/share/fonts/truetype + ln -s "${regular}" "${bold}" "${italic}" "${boldItalic}" $out/share/fonts/truetype + ''