diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2015-04-09 20:11:42 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2015-04-09 20:11:42 +0200 |
commit | 859e2c53d6cdca4119020c89c938894c0544078d (patch) | |
tree | f9144c42bb79aa67922cd8ca57957746ff694f91 /pkgs/data | |
parent | 3f0c0c3029ee7b1ff820538e5bcebc2821e5b4e0 (diff) | |
parent | cebc43403ac33ed985353dca24a0bf67ad0c259b (diff) |
Merge #6793: add packages for some fonts
Also handle font-family aliases. (I'm sorry about the bad commit above.)
Diffstat (limited to 'pkgs/data')
-rw-r--r-- | pkgs/data/fonts/caladea/cambria-alias.conf | 18 | ||||
-rw-r--r-- | pkgs/data/fonts/caladea/default.nix | 40 | ||||
-rw-r--r-- | pkgs/data/fonts/carlito/calibri-alias.conf | 18 | ||||
-rw-r--r-- | pkgs/data/fonts/carlito/default.nix | 40 | ||||
-rw-r--r-- | pkgs/data/fonts/comfortaa/default.nix | 31 | ||||
-rw-r--r-- | pkgs/data/fonts/comic-relief/comic-sans-ms-alias.conf | 18 | ||||
-rw-r--r-- | pkgs/data/fonts/comic-relief/default.nix | 49 | ||||
-rw-r--r-- | pkgs/data/fonts/crimson/default.nix | 28 | ||||
-rw-r--r-- | pkgs/data/fonts/fantasque-sans-mono/default.nix | 34 | ||||
-rw-r--r-- | pkgs/data/fonts/lobster-two/default.nix | 75 | ||||
-rw-r--r-- | pkgs/data/fonts/pecita/default.nix | 26 | ||||
-rw-r--r-- | pkgs/data/fonts/quattrocento-sans/default.nix | 31 | ||||
-rw-r--r-- | pkgs/data/fonts/quattrocento/default.nix | 29 |
13 files changed, 437 insertions, 0 deletions
diff --git a/pkgs/data/fonts/caladea/cambria-alias.conf b/pkgs/data/fonts/caladea/cambria-alias.conf new file mode 100644 index 0000000000000..f763e2a8c3468 --- /dev/null +++ b/pkgs/data/fonts/caladea/cambria-alias.conf @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<fontconfig> + <!-- Configure Caladea as a metric-compatible alias for the + Microsoft Cambria font family. --> + <alias binding="same"> + <family>Cambria</family> + <accept> + <family>Caladea</family> + </accept> + </alias> + <alias binding="same"> + <family>Caladea</family> + <default> + <family>Cambria</family> + </default> + </alias> +</fontconfig> diff --git a/pkgs/data/fonts/caladea/default.nix b/pkgs/data/fonts/caladea/default.nix new file mode 100644 index 0000000000000..110405839a122 --- /dev/null +++ b/pkgs/data/fonts/caladea/default.nix @@ -0,0 +1,40 @@ +{stdenv, fetchurl}: + +stdenv.mkDerivation rec { + name = "caladea-${version}"; + version = "20130214"; + + src = fetchurl { + url = "https://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/crosextrafonts-${version}.tar.gz"; + sha256 = "02addvvkbvf3bn21kfyj10j9w1c8hdxxld4wjmnc1j8ksqpir3f4"; + }; + + phases = ["unpackPhase" "installPhase"]; + + installPhase = '' + mkdir -p $out/etc/fonts/conf.d + mkdir -p $out/share/fonts/truetype + cp -v *.ttf $out/share/fonts/truetype + cp -v ${./cambria-alias.conf} $out/etc/fonts/conf.d/30-cambria.conf + ''; + + meta = with stdenv.lib; { + # This font doesn't appear to have any official web site but this + # one provides some good information and samples. + homepage = http://openfontlibrary.org/en/font/caladea; + description = "A serif font metric-compatible with Microsoft Cambria"; + longDescription = '' + Caladea is a free font that is metric-compatible with the + Microsoft Cambria font. Developed by Carolina Giovagnoli and + Andrés Torresi at Huerta Tipográfica foundry. + ''; + license = licenses.asl20; + platforms = platforms.all; + maintainers = [maintainers.rycee]; + + # Reduce the priority of this package. The intent is that if you + # also install the `vista-fonts` package, then you probably will + # not want to install the font alias of this package. + priority = 10; + }; +} diff --git a/pkgs/data/fonts/carlito/calibri-alias.conf b/pkgs/data/fonts/carlito/calibri-alias.conf new file mode 100644 index 0000000000000..294af3b6c7840 --- /dev/null +++ b/pkgs/data/fonts/carlito/calibri-alias.conf @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<fontconfig> + <!-- Configure Carlito as a metric-compatible alias for the + Microsoft Calibri font family. --> + <alias binding="same"> + <family>Calibri</family> + <accept> + <family>Carlito</family> + </accept> + </alias> + <alias binding="same"> + <family>Carlito</family> + <default> + <family>Calibri</family> + </default> + </alias> +</fontconfig> diff --git a/pkgs/data/fonts/carlito/default.nix b/pkgs/data/fonts/carlito/default.nix new file mode 100644 index 0000000000000..b90d89c9779c3 --- /dev/null +++ b/pkgs/data/fonts/carlito/default.nix @@ -0,0 +1,40 @@ +{stdenv, fetchurl}: + +stdenv.mkDerivation rec { + name = "carlito-${version}"; + version = "20130920"; + + src = fetchurl { + url = "https://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/crosextrafonts-carlito-${version}.tar.gz"; + sha256 = "0nmgzp6gdvv4dipswrw0l1bfjp4jbic2qvm7dpqiq71jpin2plab"; + }; + + phases = ["unpackPhase" "installPhase"]; + + installPhase = '' + mkdir -p $out/etc/fonts/conf.d + mkdir -p $out/share/fonts/truetype + cp -v *.ttf $out/share/fonts/truetype + cp -v ${./calibri-alias.conf} $out/etc/fonts/conf.d/30-calibri.conf + ''; + + meta = with stdenv.lib; { + # This font doesn't appear to have any official web site but this + # one provides some good information and samples. + homepage = http://openfontlibrary.org/en/font/carlito; + description = "A sans-serif font metric-compatible with Microsoft Calibri"; + longDescription = '' + Carlito is a free font that is metric-compatible with the + Microsoft Calibri font. The font is designed by Łukasz Dziedzic + of the tyPoland foundry and based his Lato font. + ''; + license = licenses.ofl; + platforms = platforms.all; + maintainers = [maintainers.rycee]; + + # Reduce the priority of this package. The intent is that if you + # also install the `vista-fonts` package, then you probably will + # not want to install the font alias of this package. + priority = 10; + }; +} diff --git a/pkgs/data/fonts/comfortaa/default.nix b/pkgs/data/fonts/comfortaa/default.nix new file mode 100644 index 0000000000000..c773f3955921f --- /dev/null +++ b/pkgs/data/fonts/comfortaa/default.nix @@ -0,0 +1,31 @@ +{stdenv, fetchurl, unzip}: + +stdenv.mkDerivation rec { + name = "comfortaa-${version}"; + version = "2.004"; + + src = fetchurl { + url = "http://openfontlibrary.org/assets/downloads/comfortaa/38318a69b56162733bf82bc0170b7521/comfortaa.zip"; + sha256 = "0js0kk5g6b7xrq92b68gz5ipbiv1havnbgnfqzvlw3k3nllwnl9z"; + }; + + phases = ["unpackPhase" "installPhase"]; + + buildInputs = [unzip]; + + installPhase = '' + mkdir -p $out/share/fonts/truetype + mkdir -p $out/share/doc/${name} + cp -v *.ttf $out/share/fonts/truetype/ + cp -v FONTLOG.txt $out/share/doc/${name}/ + cp -v donate.html $out/share/doc/${name}/ + ''; + + meta = with stdenv.lib; { + homepage = http://aajohan.deviantart.com/art/Comfortaa-font-105395949; + description = "A clean and modern font suitable for headings and logos"; + license = licenses.ofl; + platforms = platforms.all; + maintainers = [maintainers.rycee]; + }; +} diff --git a/pkgs/data/fonts/comic-relief/comic-sans-ms-alias.conf b/pkgs/data/fonts/comic-relief/comic-sans-ms-alias.conf new file mode 100644 index 0000000000000..be5f6cca866df --- /dev/null +++ b/pkgs/data/fonts/comic-relief/comic-sans-ms-alias.conf @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<fontconfig> + <!-- Configure Comic Relief as a metric-compatible alias for the + Microsoft Comic Sans font family. --> + <alias binding="same"> + <family>Comic Sans MS</family> + <accept> + <family>Comic Relief</family> + </accept> + </alias> + <alias binding="same"> + <family>Comic Relief</family> + <default> + <family>Comic Sans MS</family> + </default> + </alias> +</fontconfig> diff --git a/pkgs/data/fonts/comic-relief/default.nix b/pkgs/data/fonts/comic-relief/default.nix new file mode 100644 index 0000000000000..a8b2b786efaf1 --- /dev/null +++ b/pkgs/data/fonts/comic-relief/default.nix @@ -0,0 +1,49 @@ +{stdenv, fetchurl, unzip}: + +stdenv.mkDerivation rec { + name = "comic-relief-${version}"; + version = "1.1"; + + src = fetchurl { + url = "https://dl.dropbox.com/u/56493902/loudifier/comicrelief.zip"; + sha256 = "0wpf10m9zmcfvcxgc7dxzdm3syam7d7qxlfabgr1nxzq299kh8ch"; + }; + + buildInputs = [unzip]; + + phases = ["unpackPhase" "installPhase"]; + + unpackCmd = '' + mkdir -p ${name} + unzip -qq -d ${name} $src + ''; + + installPhase = '' + mkdir -p $out/etc/fonts/conf.d + mkdir -p $out/share/doc/${name} + mkdir -p $out/share/fonts/truetype + cp -v *.ttf $out/share/fonts/truetype + cp -v ${./comic-sans-ms-alias.conf} $out/etc/fonts/conf.d/30-comic-sans-ms.conf + cp -v FONTLOG.txt $out/share/doc/${name} + ''; + + meta = with stdenv.lib; { + homepage = http://loudifier.com/comic-relief/; + description = "A font metric-compatible with Microsoft Comic Sans"; + longDescription = '' + Comic Relief is a typeface designed to be metrically equivalent + to the popular Comic Sans MS. Comic Relief can be used in place + of Comic Sans MS without having to move, resize, or reset any + part of the copy. It contains all glyphs and characters + available in Comic Sans MS. + ''; + license = licenses.ofl; + platforms = platforms.all; + maintainers = [maintainers.rycee]; + + # Reduce the priority of this package. The intent is that if you + # also install the `corefonts` package, then you probably will not + # want to install the font alias of this package. + priority = 10; + }; +} diff --git a/pkgs/data/fonts/crimson/default.nix b/pkgs/data/fonts/crimson/default.nix new file mode 100644 index 0000000000000..f612f0770647c --- /dev/null +++ b/pkgs/data/fonts/crimson/default.nix @@ -0,0 +1,28 @@ +{stdenv, fetchurl}: + +stdenv.mkDerivation rec { + name = "crimson-${version}"; + version = "2014.10"; + + src = fetchurl { + url = "https://github.com/skosch/Crimson/archive/fonts-october2014.tar.gz"; + sha256 = "0qyihrhqb89vwg9cfpaf5xqmcjvs4r4614bxy634vmqv9v1bzn5b"; + }; + + phases = ["unpackPhase" "installPhase"]; + + installPhase = '' + mkdir -p $out/share/fonts/opentype + mkdir -p $out/share/doc/${name} + cp -v "Desktop Fonts/OTF/"*.otf $out/share/fonts/opentype + cp -v README.md $out/share/doc/${name} + ''; + + meta = with stdenv.lib; { + homepage = https://aldusleaf.org/crimson.html; + description = "A font family inspired by beautiful oldstyle typefaces"; + license = licenses.ofl; + platforms = platforms.all; + maintainers = [maintainers.rycee]; + }; +} diff --git a/pkgs/data/fonts/fantasque-sans-mono/default.nix b/pkgs/data/fonts/fantasque-sans-mono/default.nix new file mode 100644 index 0000000000000..930c0a22520b6 --- /dev/null +++ b/pkgs/data/fonts/fantasque-sans-mono/default.nix @@ -0,0 +1,34 @@ +{stdenv, fetchurl, unzip}: + +stdenv.mkDerivation rec { + name = "fantasque-sans-mono-${version}"; + version = "1.6.5"; + + src = fetchurl { + url = "https://github.com/belluzj/fantasque-sans/releases/download/v${version}/FantasqueSansMono.zip"; + sha256 = "19a82xlbcnd7dxqmpp03b62gjvi33bh635r0bjw2l09lgir6alym"; + }; + + buildInputs = [unzip]; + phases = ["unpackPhase" "installPhase"]; + + unpackCmd = '' + mkdir -p ${name} + unzip -qq -d ${name} $src + ''; + + installPhase = '' + mkdir -p $out/share/fonts/opentype + mkdir -p $out/share/doc/${name} + cp -v "OTF/"*.otf $out/share/fonts/opentype + cp -v README.md $out/share/doc/${name} + ''; + + meta = with stdenv.lib; { + homepage = https://github.com/belluzj/fantasque-sans; + description = "A font family with a great monospaced variant for programmers"; + license = licenses.ofl; + platforms = platforms.all; + maintainers = [maintainers.rycee]; + }; +} diff --git a/pkgs/data/fonts/lobster-two/default.nix b/pkgs/data/fonts/lobster-two/default.nix new file mode 100644 index 0000000000000..84752fe6a1d73 --- /dev/null +++ b/pkgs/data/fonts/lobster-two/default.nix @@ -0,0 +1,75 @@ +{stdenv, fetchurl}: + +let + + # HG revision in which this version of the font can be fount. + rev = "8e98053718f9a15184c93d6530885791be71b756"; + + urlBase = "https://googlefontdirectory.googlecode.com/hg-history/${rev}/ofl/lobstertwo"; + + # Just a small convenience function. + fetch = {name, path ? "/src", sha256}: + { + inherit name; + file = fetchurl { + url = "${urlBase}${path}/${name}"; + inherit sha256; + }; + }; + + fontlog = + fetch { + name = "FONTLOG.txt"; + path = ""; + sha256 = "0n405i8m70q95y8w43gzr5yvkj7gx7rd3xa4rx6y8qcqv5g7v9if"; + }; + + bold = + fetch { + name = "LobsterTwo-Bold.otf"; + sha256 = "0gkayn96vvgngs9xnmcyyf16q4payk79ghvl354rl93ayb3gf7x0"; + }; + + boldItalic = + fetch { + name = "LobsterTwo-BoldItalic.otf"; + sha256 = "0wznqkvwjqi9s4bg10fpp2345by3nxa0m0w6b3al3zaqyx2p1dxp"; + }; + + italic = + fetch { + name = "LobsterTwo-Italic.otf"; + sha256 = "0lpnzwgwl5fm6gqy8bylbryz0hy94mf1mp615y5sh0wikdvk570z"; + }; + + regular = + fetch { + name = "LobsterTwo-Regular.otf"; + sha256 = "147m3sa3sqqbkbw1hgjdwnw8w0y37x58g5p09s7q2vm74flcpbq1"; + }; +in + + stdenv.mkDerivation rec { + name = "lobstertwo-${version}"; + version = "1.006"; + + phases = ["installPhase"]; + + installPhase = '' + mkdir -p $out/share/fonts/opentype + mkdir -p $out/share/doc/${name} + cp -v ${fontlog.file} $out/share/doc/${name}/${fontlog.name} + cp -v ${bold.file} $out/share/fonts/opentype/${bold.name} + cp -v ${boldItalic.file} $out/share/fonts/opentype/${boldItalic.name} + cp -v ${italic.file} $out/share/fonts/opentype/${italic.name} + cp -v ${regular.file} $out/share/fonts/opentype/${regular.name} + ''; + + meta = with stdenv.lib; { + homepage = http://www.impallari.com/lobstertwo; + description = "Script font with many ligatures"; + license = licenses.ofl; + platforms = platforms.all; + maintainers = [maintainers.rycee]; + }; + } diff --git a/pkgs/data/fonts/pecita/default.nix b/pkgs/data/fonts/pecita/default.nix new file mode 100644 index 0000000000000..d83d9afcdfdd6 --- /dev/null +++ b/pkgs/data/fonts/pecita/default.nix @@ -0,0 +1,26 @@ +{stdenv, fetchurl}: + +stdenv.mkDerivation rec { + name = "pecita-${version}"; + version = "1.1"; + + src = fetchurl { + url = "http://pecita.eu/b/Pecita.otf"; + sha256 = "07krzpbmc5yhfbf3aklv1f150i2g1spaan9girmg3189jsn6qw6p"; + }; + + phases = ["installPhase"]; + + installPhase = '' + mkdir -p $out/share/fonts/opentype + cp -v ${src} $out/share/fonts/opentype/Pecita.otf + ''; + + meta = with stdenv.lib; { + homepage = http://pecita.eu/police-en.php; + description = "Handwritten font with connected glyphs"; + license = licenses.ofl; + platforms = platforms.all; + maintainers = [maintainers.rycee]; + }; +} diff --git a/pkgs/data/fonts/quattrocento-sans/default.nix b/pkgs/data/fonts/quattrocento-sans/default.nix new file mode 100644 index 0000000000000..116fdd25a04ec --- /dev/null +++ b/pkgs/data/fonts/quattrocento-sans/default.nix @@ -0,0 +1,31 @@ +{stdenv, fetchurl, unzip}: + +stdenv.mkDerivation rec { + name = "quattrocento-sans-${version}"; + version = "2.0"; + + src = fetchurl { + url = "http://www.impallari.com/media/releases/quattrocento-sans-v${version}.zip"; + sha256 = "043jfdn18dgzpx3qb3s0hc541n6xv4gacsm4srd6f0pri45g4wh1"; + }; + + buildInputs = [unzip]; + phases = ["unpackPhase" "installPhase"]; + + sourceRoot = "quattrocento-sans-v${version}"; + + installPhase = '' + mkdir -p $out/share/fonts/opentype + mkdir -p $out/share/doc/${name} + cp -v "src/"*.otf $out/share/fonts/opentype + cp -v FONTLOG.txt $out/share/doc/${name} + ''; + + meta = with stdenv.lib; { + homepage = http://www.impallari.com/quattrocentosans/; + description = "A classic, elegant and sober sans-serif typeface"; + license = licenses.ofl; + platforms = platforms.all; + maintainers = [maintainers.rycee]; + }; +} diff --git a/pkgs/data/fonts/quattrocento/default.nix b/pkgs/data/fonts/quattrocento/default.nix new file mode 100644 index 0000000000000..7ef62d2300c5c --- /dev/null +++ b/pkgs/data/fonts/quattrocento/default.nix @@ -0,0 +1,29 @@ +{stdenv, fetchurl, unzip}: + +stdenv.mkDerivation rec { + name = "quattrocento-${version}"; + version = "1.1"; + + src = fetchurl { + url = "http://www.impallari.com/media/releases/quattrocento-v${version}.zip"; + sha256 = "09wmbfwkry1r2cf5z4yy67wd4yzlnsjigg01r5r80z1phl0axn9n"; + }; + + buildInputs = [unzip]; + phases = ["unpackPhase" "installPhase"]; + + installPhase = '' + mkdir -p $out/share/fonts/opentype + mkdir -p $out/share/doc/${name} + cp -v "src/"*.otf $out/share/fonts/opentype + cp -v FONTLOG.txt $out/share/doc/${name} + ''; + + meta = with stdenv.lib; { + homepage = http://www.impallari.com/quattrocento/; + description = "A classic, elegant, sober and strong serif typeface"; + license = licenses.ofl; + platforms = platforms.all; + maintainers = [maintainers.rycee]; + }; +} |