From 424820916f845aee13d90a854fb7e8efd7587f71 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Sun, 22 Jan 2023 11:22:34 +0100 Subject: [PATCH] route159: migrate to stdenvNoCC, fix download link --- pkgs/data/fonts/route159/default.nix | 29 ++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/pkgs/data/fonts/route159/default.nix b/pkgs/data/fonts/route159/default.nix index cbc89c550b3c..4d0bf9941b44 100644 --- a/pkgs/data/fonts/route159/default.nix +++ b/pkgs/data/fonts/route159/default.nix @@ -1,27 +1,32 @@ -{ lib, fetchzip }: +{ lib, stdenvNoCC, fetchzip }: let majorVersion = "1"; minorVersion = "10"; - pname = "route159"; in +stdenvNoCC.mkDerivation (self: { + pname = "route159"; + version = "${majorVersion}.${minorVersion}"; -fetchzip { - name = "${pname}-font-${majorVersion}.${minorVersion}"; + src = fetchzip { + url = "https://dotcolon.net/download/fonts/${self.pname}_${majorVersion}${minorVersion}.zip"; + hash = "sha256-1InyBW1LGbp/IU/ql9mvT14W3MTxJdWThFwRH6VHpTU="; + stripRoot = false; + }; - url = "http://dotcolon.net/DL/font/${pname}_${majorVersion}${minorVersion}.zip"; - sha256 = "1nv5csg73arvvwpac7ylh4j9n0s3qp79rbv2s4jvs2bf6gqhsq7h"; + installPhase = '' + runHook preInstall - postFetch = '' - mkdir -p $out/share/fonts/opentype/${pname} - unzip -j $downloadedFile \*.otf -d $out/share/fonts/opentype/${pname} + install -D -m444 -t $out/share/fonts/opentype $src/*.otf + + runHook postInstall ''; meta = with lib; { - homepage = "http://dotcolon.net/font/${pname}/"; + homepage = "http://dotcolon.net/font/${self.pname}/"; description = "A weighted sans serif font"; platforms = platforms.all; - maintainers = with maintainers; [ leenaars ]; + maintainers = with maintainers; [ leenaars minijackson ]; license = licenses.ofl; }; -} +})