From 9303d8fb51f1493e7e8753f27dfcc24ae3183b7b Mon Sep 17 00:00:00 2001 From: Minijackson Date: Sat, 21 Jan 2023 14:57:24 +0100 Subject: [PATCH] league-of-moveable-type: migrate to symlinkJoin --- .../fonts/league-of-moveable-type/default.nix | 73 ++++++++++------- .../fonts/league-of-moveable-type/fonts.nix | 82 ------------------- .../fonts/league-of-moveable-type/update.sh | 25 ------ 3 files changed, 42 insertions(+), 138 deletions(-) delete mode 100644 pkgs/data/fonts/league-of-moveable-type/fonts.nix delete mode 100644 pkgs/data/fonts/league-of-moveable-type/update.sh diff --git a/pkgs/data/fonts/league-of-moveable-type/default.nix b/pkgs/data/fonts/league-of-moveable-type/default.nix index f6855dc99d66..905cf0a9adec 100644 --- a/pkgs/data/fonts/league-of-moveable-type/default.nix +++ b/pkgs/data/fonts/league-of-moveable-type/default.nix @@ -1,35 +1,46 @@ -{lib, stdenv, fetchurl, unzip, raleway}: +{ lib +, symlinkJoin +, the-neue-black +, blackout +, chunk +, fanwood +, goudy-bookletter-1911 +, junction-font +, knewave +, league-gothic +, league-script-number-one +, league-spartan +, linden-hill +, orbitron +, ostrich-sans +, prociono +, raleway +, sniglet +, sorts-mill-goudy +}: -let +symlinkJoin { + name = "league-of-moveable-type"; - # TO UPDATE: - # ./update.sh > ./fonts.nix - # we use the extended version of raleway (same license). - fonts = [raleway] - ++ map fetchurl (builtins.filter (f: f.name != "raleway.zip") (import ./fonts.nix)); - -in -stdenv.mkDerivation rec { - - baseName = "league-of-moveable-type"; - version = "2016-10-15"; - name="${baseName}-${version}"; - - srcs = fonts; - - nativeBuildInputs = [ unzip ]; - sourceRoot = "."; - - installPhase = '' - mkdir -p $out/share/fonts/opentype - cp */*.otf $out/share/fonts/opentype - # for Raleway, where the fonts are already in /share/… - cp */share/fonts/opentype/*.otf $out/share/fonts/opentype - ''; - - outputHashAlgo = "sha256"; - outputHashMode = "recursive"; - outputHash = "1gy959qhhdwm1phbrkab9isi0dmxcy0yizzncb0k49w88mc13vd0"; + paths = [ + the-neue-black + blackout + chunk + fanwood + goudy-bookletter-1911 + junction-font + knewave + league-gothic + league-script-number-one + league-spartan + linden-hill + orbitron + ostrich-sans + prociono + raleway + sniglet + sorts-mill-goudy + ]; meta = { description = "Font Collection by The League of Moveable Type"; @@ -46,6 +57,6 @@ stdenv.mkDerivation rec { license = lib.licenses.ofl; platforms = lib.platforms.all; - maintainers = with lib.maintainers; [ bergey Profpatsch ]; + maintainers = with lib.maintainers; [ bergey minijackson Profpatsch ]; }; } diff --git a/pkgs/data/fonts/league-of-moveable-type/fonts.nix b/pkgs/data/fonts/league-of-moveable-type/fonts.nix deleted file mode 100644 index efbe6a4c41cb..000000000000 --- a/pkgs/data/fonts/league-of-moveable-type/fonts.nix +++ /dev/null @@ -1,82 +0,0 @@ -[ - { - url = "https://www.theleagueofmoveabletype.com/league-spartan/download"; - sha256 = "1z9pff8xm58njs7whaxb3sq4vbdkxv7llwgm9nqhwshmgr52jrm1"; - name = "league-spartan.zip"; - } - { - url = "https://www.theleagueofmoveabletype.com/junction/download"; - sha256 = "1qbhfha012ma26n43lm1fh06i7z47wk50r8qsp09bpxc5yr4ypi7"; - name = "junction.zip"; - } - { - url = "https://www.theleagueofmoveabletype.com/ostrich-sans/download"; - sha256 = "11ydhbgcfhmydcnim64vb035cha14krxxrbf62426dm6bvxkphp3"; - name = "ostrich-sans.zip"; - } - { - url = "https://www.theleagueofmoveabletype.com/league-gothic/download"; - sha256 = "0nbwsbwhs375kbis3lpk98dw05mnh455vghjg1cq0j2fsj1zb99b"; - name = "league-gothic.zip"; - } - { - url = "https://www.theleagueofmoveabletype.com/blackout/download"; - sha256 = "1r7dihnjvy4fgvaj5m4llc9dm4cpdl1l79mhg3as16qvjgazms3p"; - name = "blackout.zip"; - } - { - url = "https://www.theleagueofmoveabletype.com/knewave/download"; - sha256 = "065yiakhm6h6jkmigj4pqm2qi6saph0pwb7g8s9gwkskhkk5iy57"; - name = "knewave.zip"; - } - { - url = "https://www.theleagueofmoveabletype.com/fanwood/download"; - sha256 = "1023da7hik8ci8s7rcy6lh4h9p6igx1kz9y1a2cv6sizbp819w8g"; - name = "fanwood.zip"; - } - { - url = "https://www.theleagueofmoveabletype.com/linden-hill/download"; - sha256 = "0rm92rz9kki91l5wcn149mdpwq1mfql4dv6d159hv534qmg3z3ks"; - name = "linden-hill.zip"; - } - { - url = "https://www.theleagueofmoveabletype.com/league-script-number-one/download"; - sha256 = "056hb02a5vydrq5q0gwzanp2zkrrv1spm8sfc5wzhyfzgwd1vc76"; - name = "league-script-number-one.zip"; - } - { - url = "https://www.theleagueofmoveabletype.com/raleway/download"; - sha256 = "0f6anym0adq0ankqbdqx4lyzbysx824zqdj1x60gafyisjx48y87"; - name = "raleway.zip"; - } - { - url = "https://www.theleagueofmoveabletype.com/prociono/download"; - sha256 = "11hamjry5lx3cykzpjq7kwlp6h9cjqy470fmn9f2pi954b46xkdy"; - name = "prociono.zip"; - } - { - url = "https://www.theleagueofmoveabletype.com/orbitron/download"; - sha256 = "156w4j324d350pvjmzdg2w8inhhdfzrvb86rhlavgd9sxx2fykk4"; - name = "orbitron.zip"; - } - { - url = "https://www.theleagueofmoveabletype.com/goudy-bookletter-1911/download"; - sha256 = "01qganq5n7rgqw546lf45kj8j7ymfjr00i2bwp3qw7ibifg9pn4n"; - name = "goudy-bookletter-1911.zip"; - } - { - url = "https://www.theleagueofmoveabletype.com/sorts-mill-goudy/download"; - sha256 = "11aywj5lzapk04k2yzi1g96acbbm48x902ka0v9cfwwqpn6js9ra"; - name = "sorts-mill-goudy.zip"; - } - { - url = "https://www.theleagueofmoveabletype.com/chunk/download"; - sha256 = "15mbqwz90y1n4vlj2xkc8vd56va6la5qnxhiipvcmkrng5y3931j"; - name = "chunk.zip"; - } - { - url = "https://www.theleagueofmoveabletype.com/sniglet/download"; - sha256 = "1lhpnjm52gyhy9s2kwbsg1rd9iyrqli5q9ngp141igx4p1bgbqkc"; - name = "sniglet.zip"; - } -] diff --git a/pkgs/data/fonts/league-of-moveable-type/update.sh b/pkgs/data/fonts/league-of-moveable-type/update.sh deleted file mode 100644 index 4d41df4fdb85..000000000000 --- a/pkgs/data/fonts/league-of-moveable-type/update.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash - -SITE=https://www.theleagueofmoveabletype.com - -# since there is no nice way to get all the fonts, -# this fetches the homepage and extracts their names from the html … -fonts=$(curl "$SITE" 2>/dev/null | \ - sed -ne 's//dev/null) - cat <