Merge pull request #8297 from rycee/fonts-remove-builderDefsPackage

Remove use of builderDefsPackage in font packages.

+180 -340
+23 -51
pkgs/data/fonts/andagii/default.nix
··· 1 - x@{builderDefsPackage 2 - , unzip 3 - , ...}: 4 - builderDefsPackage 5 - (a : 6 - let 7 - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 8 - []; 1 + { stdenv, fetchzip }: 2 + 3 + stdenv.mkDerivation rec { 4 + name = "andagii-${version}"; 5 + version = "1.0.2"; 9 6 10 - buildInputs = map (n: builtins.getAttr n x) 11 - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); 12 - sourceInfo = rec { 13 - url="http://www.i18nguy.com/unicode/andagii.zip"; 14 - name="andagii"; 15 - version="1.0.2"; 16 - hash="0cknb8vin15akz4ahpyayrpqyaygp9dgrx6qw7zs7d6iv9v59ds1"; 17 - }; 18 - in 19 - rec { 20 - src = a.fetchurl { 21 - url = sourceInfo.url; 7 + src = fetchzip { 8 + url = http://www.i18nguy.com/unicode/andagii.zip; 9 + sha256 = "0a0c43y1fd5ksj50axhng7p00kgga0i15p136g68p35wj7kh5g2k"; 10 + stripRoot = false; 22 11 curlOpts = "--user-agent 'Mozilla/5.0'"; 23 - sha256 = sourceInfo.hash; 24 12 }; 25 13 26 - name = "${sourceInfo.name}-${sourceInfo.version}"; 27 - inherit buildInputs; 14 + phases = [ "unpackPhase" "installPhase" ]; 28 15 29 - /* doConfigure should be removed if not needed */ 30 - phaseNames = ["doUnpack" "doInstall"]; 31 - 32 - doUnpack = a.fullDepEntry '' 33 - unzip "${src}" 34 - '' ["addInputs"]; 16 + installPhase = '' 17 + mkdir -p $out/share/fonts/truetype 18 + cp -v ANDAGII_.TTF $out/share/fonts/truetype/andagii.ttf 19 + ''; 35 20 36 - doInstall = a.fullDepEntry ('' 37 - mkdir -p "$out"/share/fonts/ttf/ 38 - cp ANDAGII_.TTF "$out"/share/fonts/ttf/andagii.ttf 39 - '') ["defEnsureDir" "minInit"]; 40 - 41 - meta = { 21 + # There are multiple claims that the font is GPL, so I include the 22 + # package; but I cannot find the original source, so use it on your 23 + # own risk Debian claims it is GPL - good enough for me. 24 + meta = with stdenv.lib; { 25 + homepage = http://www.i18nguy.com/unicode/unicode-font.HTML; 42 26 description = "Unicode Plane 1 Osmanya script font"; 43 - maintainers = with a.lib.maintainers; 44 - [ 45 - raskin 46 - ]; 47 - hydraPlatforms = []; 48 - # There are multiple claims that the font is GPL, 49 - # so I include the package; but I cannot find the 50 - # original source, so use it on your own risk 51 - # Debian claims it is GPL - good enough for me. 27 + maintainers = with maintainers; [ raskin rycee ]; 28 + license = "unknown"; 29 + platforms = platforms.all; 52 30 }; 53 - passthru = { 54 - updateInfo = { 55 - downloadPage = "http://www.i18nguy.com/unicode/unicode-font.html"; 56 - }; 57 - }; 58 - }) x 59 - 31 + }
+28 -42
pkgs/data/fonts/anonymous-pro/default.nix
··· 1 - x@{builderDefsPackage 2 - , unzip 3 - , ...}: 4 - builderDefsPackage 5 - (a : 6 - let 7 - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 8 - []; 1 + { stdenv, fetchurl, unzip }: 9 2 10 - buildInputs = map (n: builtins.getAttr n x) 11 - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); 12 - sourceInfo = rec { 13 - version = "1.002"; 14 - name="anonymousPro"; 15 - url="http://www.ms-studio.com/FontSales/AnonymousPro-${version}.zip"; 3 + stdenv.mkDerivation rec { 4 + name = "anonymousPro-${version}"; 5 + version = "1.002"; 6 + 7 + src = fetchurl { 8 + url = "http://www.marksimonson.com/assets/content/fonts/AnonymousPro-${version}.zip"; 16 9 sha256 = "1asj6lykvxh46czbal7ymy2k861zlcdqpz8x3s5bbpqwlm3mhrl6"; 17 - }; 18 - in 19 - rec { 20 - src = a.fetchurl { 21 - url = sourceInfo.url; 22 - sha256 = sourceInfo.sha256; 23 10 }; 24 11 25 - name = "${sourceInfo.name}-${sourceInfo.version}"; 26 - inherit buildInputs; 12 + nativeBuildInputs = [ unzip ]; 13 + phases = [ "unpackPhase" "installPhase" ]; 27 14 28 - phaseNames = ["doUnpack" "installFonts"]; 15 + installPhase = '' 16 + mkdir -p $out/share/fonts/truetype 17 + mkdir -p $out/share/doc/${name} 18 + find . -name "*.ttf" -exec cp -v {} $out/share/fonts/truetype \; 19 + find . -name "*.txt" -exec cp -v {} $out/share/doc/${name} \; 20 + ''; 29 21 30 - doUnpack = a.fullDepEntry ('' 31 - unzip ${src} 32 - cd AnonymousPro*/ 33 - '') ["addInputs"]; 34 - 35 - meta = { 22 + meta = with stdenv.lib; { 23 + homepage = http://www.marksimonson.com/fonts/view/anonymous-pro; 36 24 description = "TrueType font set intended for source code"; 37 - maintainers = with a.lib.maintainers; 38 - [ 39 - raskin 40 - ]; 41 - platforms = with a.lib.platforms; 42 - all; 43 - license = with a.lib.licenses; ofl; 44 - hydraPlatforms = []; 45 - homepage = "http://www.marksimonson.com/fonts/view/anonymous-pro"; 46 - downloadPage = "http://www.ms-studio.com/FontSales/anonymouspro.html"; 47 - inherit (sourceInfo) version; 25 + longDescription = '' 26 + Anonymous Pro (2009) is a family of four fixed-width fonts 27 + designed with coding in mind. Anonymous Pro features an 28 + international, Unicode-based character set, with support for 29 + most Western and Central European Latin-based languages, plus 30 + Greek and Cyrillic. It is designed by Mark Simonson. 31 + ''; 32 + maintainers = with maintainers; [ raskin rycee ]; 33 + license = licenses.ofl; 34 + platforms = platforms.all; 48 35 }; 49 - }) x 50 - 36 + }
+21 -33
pkgs/data/fonts/cm-unicode/default.nix
··· 1 - x@{builderDefsPackage 2 - , ...}: 3 - builderDefsPackage 4 - (a : 5 - let 6 - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 7 - []; 1 + { stdenv, fetchurl }: 8 2 9 - buildInputs = map (n: builtins.getAttr n x) 10 - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); 11 - sourceInfo = rec { 12 - version = "0.7.0"; 13 - baseName="cm-unicode"; 14 - name="${baseName}-${version}"; 15 - url="mirror://sourceforge/${baseName}/${baseName}/${version}/${name}-otf.tar.xz"; 16 - }; 17 - in 18 - rec { 19 - src = a.fetchurl { 20 - url = sourceInfo.url; 3 + stdenv.mkDerivation rec { 4 + name = "cm-unicode-${version}"; 5 + version = "0.7.0"; 6 + 7 + src = fetchurl { 8 + url = "mirror://sourceforge/cm-unicode/cm-unicode/${version}/${name}-otf.tar.xz"; 21 9 sha256 = "0a0w9qm9g8qz2xh3lr61bj1ymqslqsvk4w2ybc3v2qa89nz7x2jl"; 22 10 }; 23 11 24 - inherit (sourceInfo) name version; 25 - inherit buildInputs; 12 + phases = [ "unpackPhase" "installPhase" ]; 26 13 27 - phaseNames = ["doUnpack" "installFonts"]; 14 + installPhase = '' 15 + mkdir -p $out/share/fonts/opentype 16 + mkdir -p $out/share/doc/${name} 17 + cp -v *.otf $out/share/fonts/opentype/ 18 + cp -v README FontLog.txt $out/share/doc/${name} 19 + ''; 28 20 29 - meta = { 30 - maintainers = with a.lib.maintainers; 31 - [ 32 - raskin 33 - ]; 34 - platforms = with a.lib.platforms; 35 - all; 36 - downloadPage = "http://sourceforge.net/projects/cm-unicode/files/cm-unicode/"; 37 - inherit version; 21 + meta = with stdenv.lib; { 22 + homepage = http://canopus.iacp.dvo.ru/~panov/cm-unicode/; 23 + description = "Computer Modern Unicode fonts"; 24 + maintainers = with maintainers; [ raskin rycee ]; 25 + license = licenses.ofl; 26 + platforms = platforms.all; 38 27 }; 39 - }) x 40 - 28 + }
+20 -42
pkgs/data/fonts/eb-garamond/default.nix
··· 1 - x@{builderDefsPackage 2 - , unzip 3 - , ...}: 4 - builderDefsPackage 5 - (a : 6 - let 7 - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 8 - []; 1 + { stdenv, fetchzip }: 9 2 10 - buildInputs = map (n: builtins.getAttr n x) 11 - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); 12 - sourceInfo = rec { 13 - version="0.016"; 14 - name="EBGaramond"; 15 - url="https://bitbucket.org/georgd/eb-garamond/downloads/${name}-${version}.zip"; 16 - hash="0y630khn5zh70al3mm84fs767ac94ffyz1w70zzhrhambx07pdx0"; 17 - }; 18 - in 19 - rec { 20 - src = a.fetchurl { 21 - url = sourceInfo.url; 22 - sha256 = sourceInfo.hash; 23 - }; 3 + stdenv.mkDerivation rec { 4 + name = "eb-garamond-${version}"; 5 + version = "0.016"; 24 6 25 - name = "eb-garamond-${sourceInfo.version}"; 26 - inherit buildInputs; 7 + src = fetchzip { 8 + url = "https://bitbucket.org/georgd/eb-garamond/downloads/EBGaramond-${version}.zip"; 9 + sha256 = "0j40bg1di39q7zis64il67xchldyznrl8wij9il10c4wr8nl4r9z"; 10 + }; 27 11 28 - phaseNames = ["doUnpack" "installFonts"]; 12 + phases = [ "unpackPhase" "installPhase" ]; 29 13 30 - # This will clean up if/when 8263996 lands. 31 - doUnpack = a.fullDepEntry ('' 32 - unzip ${src} 33 - cd ${sourceInfo.name}* 34 - mv {ttf,otf}/* . 35 - '') ["addInputs"]; 14 + installPhase = '' 15 + mkdir -p $out/share/fonts/opentype 16 + mkdir -p $out/share/doc/${name} 17 + cp -v "otf/"*.otf $out/share/fonts/opentype/ 18 + cp -v Changes README.markdown README.xelualatex $out/share/doc/${name} 19 + ''; 36 20 37 - meta = with a.lib; { 21 + meta = with stdenv.lib; { 22 + homepage = http://www.georgduffner.at/ebgaramond/; 38 23 description = "Digitization of the Garamond shown on the Egenolff-Berner specimen"; 39 - maintainers = with maintainers; [ relrod ]; 40 - platforms = platforms.all; 24 + maintainers = with maintainers; [ relrod rycee ]; 41 25 license = licenses.ofl; 42 - homepage = http://www.georgduffner.at/ebgaramond/; 26 + platforms = platforms.all; 43 27 }; 44 - passthru = { 45 - updateInfo = { 46 - downloadPage = "https://github.com/georgd/EB-Garamond/releases"; 47 - }; 48 - }; 49 - }) x 50 - 28 + }
+23 -40
pkgs/data/fonts/gentium/default.nix
··· 1 - x@{builderDefsPackage 2 - , unzip 3 - , ...}: 4 - builderDefsPackage 5 - (a : 6 - let 7 - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 8 - []; 1 + { stdenv, fetchzip }: 9 2 10 - buildInputs = map (n: builtins.getAttr n x) 11 - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); 12 - sourceInfo = rec { 13 - version="1.504"; 14 - baseName="GentiumPlus"; 15 - name="${baseName}-${version}"; 16 - url="http://scripts.sil.org/cms/scripts/render_download.php?&format=file&media_id=${name}.zip&filename=${name}"; 17 - hash="04kslaqbscpfrc6igkifcv1nkrclrm35hqpapjhw9102wpq12fpr"; 18 - }; 19 - in 20 - rec { 21 - src = a.fetchurl { 22 - url = sourceInfo.url; 23 - sha256 = sourceInfo.hash; 24 - name = "${sourceInfo.name}.zip"; 3 + stdenv.mkDerivation rec { 4 + name = "gentium-${version}"; 5 + version = "1.504"; 6 + 7 + src = fetchzip { 8 + name = "${name}.zip"; 9 + url = "http://scripts.sil.org/cms/scripts/render_download.php?format=file&media_id=GentiumPlus-${version}.zip&filename=${name}.zip"; 10 + sha256 = "1xdx80dfal0b8rkrp1janybx2hki7algnvkx4hyghgikpjcjkdh7"; 25 11 }; 26 12 27 - inherit (sourceInfo) name version; 28 - inherit buildInputs; 13 + phases = [ "unpackPhase" "installPhase" ]; 29 14 30 - phaseNames = ["addInputs" "doUnpack" "installFonts"]; 15 + installPhase = '' 16 + mkdir -p $out/share/fonts/truetype 17 + mkdir -p $out/share/doc/${name} 18 + cp -v *.ttf $out/share/fonts/truetype/ 19 + cp -v FONTLOG.txt GENTIUM-FAQ.txt README.txt $out/share/doc/${name} 20 + ''; 31 21 32 - meta = { 33 - maintainers = with a.lib.maintainers; 34 - [ 35 - raskin 36 - ]; 37 - platforms = with a.lib.platforms; 38 - all; 22 + meta = with stdenv.lib; { 23 + homepage = "http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=Gentium"; 24 + description = "A high-quality typeface family for Latin, Cyrillic, and Greek"; 25 + maintainers = with maintainers; [ raskin rycee ]; 26 + license = licenses.ofl; 27 + platforms = platforms.all; 39 28 }; 40 - passthru = { 41 - updateInfo = { 42 - downloadPage = "http://scripts.sil.org/cms/scripts/page.php?item_id=Gentium_download"; 43 - }; 44 - }; 45 - }) x 46 - 29 + }
+19 -44
pkgs/data/fonts/inconsolata/default.nix
··· 1 - x@{builderDefsPackage 2 - , fontforge 3 - , ...}: 4 - builderDefsPackage 5 - (a : 6 - let 7 - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 8 - []; 1 + { stdenv, fetchurl }: 9 2 10 - buildInputs = map (n: builtins.getAttr n x) 11 - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); 12 - sourceInfo = rec { 13 - name="inconsolata"; 14 - url="http://www.levien.com/type/myfonts/Inconsolata.sfd"; 15 - hash="1cd29c8396adb18bfeddb1abf5bdb98b677649bb9b09f126d1335b123a4cfddb"; 16 - }; 17 - in 18 - rec { 19 - src = a.fetchurl { 20 - url = sourceInfo.url; 21 - sha256 = sourceInfo.hash; 3 + stdenv.mkDerivation rec { 4 + name = "inconsolata-${version}"; 5 + version = "1.010"; 6 + 7 + src = fetchurl { 8 + url = "http://www.levien.com/type/myfonts/Inconsolata.otf"; 9 + sha256 = "06js6znbcf7swn8y3b8ki416bz96ay7d3yvddqnvi88lqhbfcq8m"; 22 10 }; 23 11 24 - inherit (sourceInfo) name; 25 - inherit buildInputs; 12 + phases = [ "installPhase" ]; 26 13 27 - /* doConfigure should be removed if not needed */ 28 - phaseNames = ["copySrc" "generateFontsFromSFD" "installFonts"]; 29 - 30 - copySrc = a.fullDepEntry ('' 31 - cp ${src} inconsolata.sfd 32 - '') ["minInit"]; 33 - 34 - generateFontsFromSFD = a.generateFontsFromSFD // {deps=["addInputs"];}; 14 + installPhase = '' 15 + mkdir -p $out/share/fonts/opentype 16 + cp -v $src $out/share/fonts/opentype/inconsolata.otf 17 + ''; 35 18 36 - meta = { 19 + meta = with stdenv.lib; { 20 + homepage = http://www.levien.com/type/myfonts/inconsolata.html; 37 21 description = "A monospace font for both screen and print"; 38 - maintainers = with a.lib.maintainers; 39 - [ 40 - raskin 41 - ]; 42 - platforms = with a.lib.platforms; 43 - all; 22 + maintainers = with maintainers; [ raskin rycee ]; 23 + license = licenses.ofl; 24 + platforms = platforms.all; 44 25 }; 45 - passthru = { 46 - updateInfo = { 47 - downloadPage = "http://www.levien.com/type/myfonts/inconsolata.html"; 48 - }; 49 - }; 50 - }) x 51 - 26 + }
+23 -44
pkgs/data/fonts/oldstandard/default.nix
··· 1 - x@{builderDefsPackage 2 - , unzip 3 - , ...}: 4 - builderDefsPackage 5 - (a : 6 - let 7 - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 8 - []; 1 + { stdenv, fetchzip }: 9 2 10 - buildInputs = map (n: builtins.getAttr n x) 11 - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); 12 - sourceInfo = rec { 13 - version="2.2"; 14 - baseName="oldstandard"; 15 - name="${baseName}-${version}"; 16 - url="http://www.thessalonica.org.ru/downloads/${name}.otf.zip"; 17 - hash="0xhbksrh9mv1cs6dl2mc8l6sypialy9wirkjr54nf7s9bcynv1h6"; 18 - }; 19 - in 20 - rec { 21 - src = a.fetchurl { 22 - url = sourceInfo.url; 23 - sha256 = sourceInfo.hash; 3 + stdenv.mkDerivation rec { 4 + name = "oldstandard-${version}"; 5 + version = "2.2"; 6 + 7 + src = fetchzip { 8 + stripRoot = false; 9 + url = "https://github.com/akryukov/oldstand/releases/download/v${version}/${name}.otf.zip"; 10 + sha256 = "1hl78jw5szdjq9dhbcv2ln75wpp2lzcxrnfc36z35v5wk4l7jc3h"; 24 11 }; 25 12 26 - inherit (sourceInfo) name version; 27 - inherit buildInputs; 13 + phases = [ "unpackPhase" "installPhase" ]; 28 14 29 - phaseNames = ["doUnpack" "installFonts"]; 15 + installPhase = '' 16 + mkdir -p $out/share/fonts/opentype 17 + mkdir -p $out/share/doc/${name} 18 + cp -v *.otf $out/share/fonts/opentype/ 19 + cp -v FONTLOG.txt $out/share/doc/${name} 20 + ''; 30 21 31 - doUnpack = a.fullDepEntry '' 32 - unzip ${src} 33 - '' ["addInputs"]; 34 - 35 - meta = { 36 - description = "An old-style font"; 37 - maintainers = with a.lib.maintainers; 38 - [ 39 - raskin 40 - ]; 41 - platforms = with a.lib.platforms; 42 - all; 22 + meta = with stdenv.lib; { 23 + homepage = https://github.com/akryukov/oldstand; 24 + description = "An attempt to revive a specific type of Modern style of serif typefaces"; 25 + maintainers = with maintainers; [ raskin rycee ]; 26 + license = licenses.ofl; 27 + platforms = platforms.all; 43 28 }; 44 - passthru = { 45 - updateInfo = { 46 - downloadPage = "http://www.thessalonica.org.ru/ru/fonts-download.html"; 47 - }; 48 - }; 49 - }) x 50 - 29 + }
+23 -44
pkgs/data/fonts/theano/default.nix
··· 1 - x@{builderDefsPackage 2 - , unzip 3 - , ...}: 4 - builderDefsPackage 5 - (a : 6 - let 7 - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 8 - []; 1 + { stdenv, fetchzip }: 9 2 10 - buildInputs = map (n: builtins.getAttr n x) 11 - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); 12 - sourceInfo = rec { 13 - version="2.0"; 14 - baseName="theano"; 15 - name="${baseName}-${version}"; 16 - url="http://www.thessalonica.org.ru/downloads/${name}.otf.zip"; 17 - hash="1xiykqbbiawvfk33639awmgdn25b8s2k7vpwncl17bzlk887b4z6"; 18 - }; 19 - in 20 - rec { 21 - src = a.fetchurl { 22 - url = sourceInfo.url; 23 - sha256 = sourceInfo.hash; 3 + stdenv.mkDerivation rec { 4 + name = "theano-${version}"; 5 + version = "2.0"; 6 + 7 + src = fetchzip { 8 + stripRoot = false; 9 + url = "https://github.com/akryukov/theano/releases/download/v${version}/theano-${version}.otf.zip"; 10 + sha256 = "1z3c63rcp4vfjyfv8xwc3br10ydwjyac3ipbl09y01s7qhfz02gp"; 24 11 }; 25 12 26 - inherit (sourceInfo) name version; 27 - inherit buildInputs; 13 + phases = [ "unpackPhase" "installPhase" ]; 28 14 29 - phaseNames = ["doUnpack" "installFonts"]; 15 + installPhase = '' 16 + mkdir -p $out/share/fonts/opentype 17 + mkdir -p $out/share/doc/${name} 18 + find . -name "*.otf" -exec cp -v {} $out/share/fonts/opentype \; 19 + find . -name "*.txt" -exec cp -v {} $out/share/doc/${name} \; 20 + ''; 30 21 31 - doUnpack = a.fullDepEntry '' 32 - unzip ${src} 33 - '' ["addInputs"]; 34 - 35 - meta = { 36 - description = "An old-style font"; 37 - maintainers = with a.lib.maintainers; 38 - [ 39 - raskin 40 - ]; 41 - platforms = with a.lib.platforms; 42 - all; 22 + meta = with stdenv.lib; { 23 + homepage = https://github.com/akryukov/theano; 24 + description = "An old-style font designed from historic samples"; 25 + maintainers = with maintainers; [ raskin rycee ]; 26 + license = licenses.ofl; 27 + platforms = platforms.all; 43 28 }; 44 - passthru = { 45 - updateInfo = { 46 - downloadPage = "http://www.thessalonica.org.ru/ru/fonts-download.html"; 47 - }; 48 - }; 49 - }) x 50 - 29 + }