From 751d0b3fd668981d3e69cf8f907a859659122074 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 16 Aug 2024 16:06:30 -0400 Subject: [PATCH] add fonts --- atau-fonts/lunchtype-ttf.nix | 19 +++++++++++++++++++ atau-fonts/space-grotesk.nix | 21 +++++++++++++++++++++ overlay.nix | 2 ++ 3 files changed, 42 insertions(+) create mode 100644 atau-fonts/lunchtype-ttf.nix create mode 100644 atau-fonts/space-grotesk.nix diff --git a/atau-fonts/lunchtype-ttf.nix b/atau-fonts/lunchtype-ttf.nix new file mode 100644 index 0000000..c040e66 --- /dev/null +++ b/atau-fonts/lunchtype-ttf.nix @@ -0,0 +1,19 @@ +{ lib, stdenv, fetchurl, unzip, ... }: + +stdenv.mkDerivation rec { + name = "lunchtype-ttf"; + pname = name; + version = "1723838178"; + + buildInputs = [ unzip ]; + + src = fetchurl { + url = "https://www.fontsquirrel.com/fonts/download/lunchtype"; + hash = "sha256-N9JVLqkm5rE/4bMmTLtlL6MdoQFQu9Ml+AIaJXGL7QY="; + }; + + unpackPhase = '' + mkdir -p $out/share/fonts/truetype + unzip $src -d $out/share/fonts/truetype + ''; +} diff --git a/atau-fonts/space-grotesk.nix b/atau-fonts/space-grotesk.nix new file mode 100644 index 0000000..c1a19f0 --- /dev/null +++ b/atau-fonts/space-grotesk.nix @@ -0,0 +1,21 @@ +{ lib, stdenv, fetchzip, ... }: + +stdenv.mkDerivation rec { + name = "space-grotesk"; + pname = name; + version = "2.0.0"; + + src = fetchzip { + url = "https://github.com/floriankarsten/space-grotesk/releases/download/${version}/SpaceGrotesk-${version}.zip"; + stripRoot = false; + hash = "sha256-niwd5E3rJdGmoyIFdNcK5M9A9P2rCbpsyZCl7CDv7I8="; + }; + + installPhase = '' + mkdir -p $out/share/fonts/truetype + mkdir -p $out/share/fonts/opentype + + mv SpaceGrotesk-${version}/ttf/* $out/share/fonts/truetype + mv SpaceGrotesk-${version}/otf/* $out/share/fonts/opentype + ''; +} diff --git a/overlay.nix b/overlay.nix index 0984519..519d7a2 100644 --- a/overlay.nix +++ b/overlay.nix @@ -4,5 +4,7 @@ prev: final: { gtk-theme-mac-os-9 = final.callPackage ./gtk-theme-mac-os-9 { }; theme-platinum9 = final.callPackage ./theme-platinum9 { }; nineicons-redux = final.callPackage ./nineicons-redux { }; + lunchtype-ttf = final.callPackage ./atau-fonts/lunchtype-ttf.nix { }; + space-grotesk = final.callPackage ./atau-fonts/space-grotesk.nix { }; }; }