Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ubuntu-font-family #19

Merged
merged 8 commits into from
Jun 23, 2012
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions pkgs/data/fonts/ubuntu-font-family/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{ stdenv, fetchurl, unzip }:

stdenv.mkDerivation rec {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since none of the attributes in the attribute set reference each other, the 'rec' here is unnecessary. But I'm about to suggest a change that will do such recursive referencing, so you might want to wait to remove this.

name = "ubuntu-font-family-0.80";
buildInputs = [unzip];

src = fetchurl {
url = http://font.ubuntu.com/download/ubuntu-font-family-0.80.zip;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the zipball is named the same as the package, you can do:

url = "http://font.ubuntu.com/download/${name}.zip";

if you keep the 'rec'. This way if the package needs updating you just need to change the name and the hash.

sha256 = "107170099bbc3beae8602b97a5c423525d363106c3c24f787d43e09811298e4c";
};

installPhase =
''
mkdir -p $out/share/fonts/ubuntu
cp *.ttf $out/share/fonts/ubuntu
'';

meta = {
description = "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.";
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6213,6 +6213,8 @@ let

vistafonts = callPackage ../data/fonts/vista-fonts { };

ubuntu_font_family = callPackage ../data/fonts/ubuntu-font-family { };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In most cases we try to follow English alphabetical ordering in all-packages.nix, so ubuntu_font_family would come before vistafonts.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improved :)


wqy_zenhei = callPackage ../data/fonts/wqy-zenhei { };

xhtml1 = callPackage ../data/sgml+xml/schemas/xml-dtd/xhtml1 { };
Expand Down