From fdd0db3a4da4ea6429315b22b29e8d2d3727649a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 4 Oct 2022 18:55:53 +0200 Subject: [PATCH] ubuntu-font-family: switch to pname+version, fix build --- .../data/fonts/ubuntu-font-family/default.nix | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/pkgs/data/fonts/ubuntu-font-family/default.nix b/pkgs/data/fonts/ubuntu-font-family/default.nix index 0f1d5b5a4cc0..0458abf91d4f 100644 --- a/pkgs/data/fonts/ubuntu-font-family/default.nix +++ b/pkgs/data/fonts/ubuntu-font-family/default.nix @@ -1,26 +1,28 @@ { lib, fetchzip }: -fetchzip { - name = "ubuntu-font-family-0.83"; +fetchzip rec { + pname = "ubuntu-font-family"; + version = "0.83"; - url = "https://assets.ubuntu.com/v1/fad7939b-ubuntu-font-family-0.83.zip"; + url = "https://assets.ubuntu.com/v1/fad7939b-ubuntu-font-family-${version}.zip"; postFetch = '' - mkdir -p $out/share/fonts - unzip -j $downloadedFile \*.ttf -d $out/share/fonts/ubuntu + mkdir -p $out/share/fonts/ubuntu + mv $out/*.ttf $out/share/fonts/ubuntu + find $out -maxdepth 1 ! -type d -exec rm {} + ''; sha256 = "090y665h4kf2bi623532l6wiwkwnpd0xds0jr7560xwfwys1hiqh"; - meta = { + meta = with lib; { description = "Ubuntu Font Family"; longDescription = "The Ubuntu typeface has been specially created to complement the Ubuntu tone of voice. It has a contemporary style and contains characteristics unique to the Ubuntu brand that convey a precise, reliable and free attitude."; homepage = "http://font.ubuntu.com/"; - license = lib.licenses.free; - platforms = lib.platforms.all; - maintainers = [ lib.maintainers.antono ]; + license = licenses.free; + platforms = platforms.all; + maintainers = [ maintainers.antono ]; }; }