Skip to content

Commit

Permalink
ubuntu-font-family: use mkDerivation
Browse files Browse the repository at this point in the history
  • Loading branch information
erdnaxe committed Oct 1, 2022
1 parent cb81a9c commit 73e9cb6
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions pkgs/data/fonts/ubuntu-font-family/default.nix
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
{ lib, fetchzip }:
{ lib, stdenv, fetchzip }:

fetchzip {
name = "ubuntu-font-family-0.83";
stdenv.mkDerivation rec {
pname = "ubuntu-font-family";
version = "0.83";

url = "https://assets.ubuntu.com/v1/fad7939b-ubuntu-font-family-0.83.zip";
src = fetchzip {
url = "https://assets.ubuntu.com/v1/fad7939b-${pname}-${version}.zip";
hash = "sha256-FAg1xn8Gcbwmuvqtg9SquSet4oTT9nqE+Izeq7ZMVcA=";
};

postFetch = ''
mkdir -p $out/share/fonts
unzip -j $downloadedFile \*.ttf -d $out/share/fonts/ubuntu
installPhase = ''
install -D -m 644 -t "$out/share/fonts/truetype" *.ttf
'';

sha256 = "090y665h4kf2bi623532l6wiwkwnpd0xds0jr7560xwfwys1hiqh";
outputHashMode = "recursive";
outputHash = "sha256-EEcYtOeOd2DKyRLo1kG7lk8euaFilCFMXMJNAosxHiQ=";

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 = with maintainers; [ antono ];
};
}

0 comments on commit 73e9cb6

Please sign in to comment.