Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

lohit-fonts: Update and split into individual font packages

+60 -20
+55 -19
pkgs/data/fonts/lohit-fonts/default.nix
··· 1 - { stdenv, fetchurl }: 2 - 3 - stdenv.mkDerivation { 4 - name = "lohit-fonts-20140220"; 5 - src = fetchurl { 6 - url = https://fedorahosted.org/releases/l/o/lohit/lohit-ttf-20140220.tar.gz; 7 - sha256 = "1rmgr445hw1n851ywy28csfvswz1i6hnc8mzp88qw2xk9j4dn32d"; 1 + { stdenv, fetchurl, lib }: 2 + let 3 + fonts = { 4 + assamese = { version = "2.91.3" ; sha256 = "0kbdvi8f7vbvsain9zmnj9h43a6bmdkhk5c2wzg15100w7wf6lpq"; }; 5 + bengali = { version = "2.91.3" ; sha256 = "1wdd2dkqaflf6nm5yc7llkfxin6g0zb2sbcd5g2xbrl0gwwcmkij"; }; 6 + devanagari = { version = "2.95.2" ; sha256 = "1ss0j0pcfrg1vsypnm0042y4bn7b84mi6lbfsvr6rs89lb5swvn2"; }; 7 + gujarati = { version = "2.92.2-and-4.2.2" ; sha256 = "1i27yjhn3x31a89x1hjs6rskdwp2kh0hibq1xiz3rgqil2m0jar6"; }; 8 + gurmukhi = { version = "2.91.0" ; sha256 = "0z8a30mnyhlfvqhnggfk0369hqg779ihqyhcmpxj0sf9dmb1i0mj"; }; # renamed from Punjabi 9 + kannada = { version = "2.5.3" ; sha256 = "1x9fb5z1bwmfi0y1fdnzizzjxhbxp272wxznx36063kjf25bb9pi"; }; 10 + malayalam = { version = "2.92.0" ; sha256 = "1syv1irxh5xl0z0d5kwankhlmi7s2dg4wpp58nq0mkd3rhm5q8qw"; }; 11 + marathi = { version = "2.94.0" ; sha256 = "0y9sca6gbfbafv52v0n2r1xfs8rg6zmqs4vp9sjfc1c6yqhzagl4"; }; 12 + nepali = { version = "2.94.0" ; sha256 = "0c56141rpxc30581i3gisg8kfaadxhqjhgshni6g7a7rn6l4dx17"; }; 13 + odia = { version = "2.91.0" ; sha256 = "15iz9kdf9k5m8wcn2iqlqjm758ac3hvnk93va6kac06frxnhw9lp"; }; # renamed from Oriya 14 + tamil-classical = { version = "2.5.3" ; sha256 = "0ci4gk8qhhysjza69nncgmqmal8s4n8829icamvlzbmjdd4s2pij"; }; 15 + tamil = { version = "2.91.1" ; sha256 = "1ir6kjl48apwk41xbpj0x458k108s7i61yzpkfhqcy1fkcr7cngj"; }; 16 + telugu = { version = "2.5.4" ; sha256 = "06gdba7690y20l7nsi8fnnimim5hlq7hik0mpk2fzw4w39hjybk9"; }; 17 + }; 18 + gplfonts = { 19 + # GPL fonts removed from later releases 20 + kashmiri = { version = "2.4.3" ; sha256 = "0ax8xzv4pz17jnsjdklawncsm2qn7176wbxykswygpzdd5lr0gg9"; }; 21 + konkani = { version = "2.4.3" ; sha256 = "03zc27z26a60aaggrqx4d6l0jgggciq8p83v6vgg0k6l3apvcp45"; }; 22 + maithili = { version = "2.4.3" ; sha256 = "0aqwnhq1namvvb77f2vssahixqf4xay7ja4q8qc312wxkajdqh4a"; }; 23 + sindhi = { version = "2.4.3" ; sha256 = "00imfbn01yc2g5zdyydks9w3ndkawr66l9qk2idlvw3yz3sw2kf1"; }; 8 24 }; 25 + mkpkg = license: name: {version, sha256}: 26 + stdenv.mkDerivation { 27 + name = "lohit-${name}-${version}"; 9 28 10 - installPhase = '' 11 - mkdir -p $out/share/fonts/truetype 12 - cp *.ttf $out/share/fonts/truetype 13 - ''; 29 + src = fetchurl { 30 + url = "https://fedorahosted.org/releases/l/o/lohit/lohit-${name}-ttf-${version}.tar.gz"; 31 + inherit sha256; 32 + }; 14 33 15 - meta = with stdenv.lib; { 16 - homepage = https://fedorahosted.org/lohit/; 17 - description = "Fonts for 21 Indian languages"; 18 - license = licenses.ofl; 19 - maintainers = [ maintainers.ttuegel ]; 20 - platforms = platforms.all; 21 - }; 22 - } 34 + installPhase = '' 35 + mkdir -p $out/share/fonts/truetype 36 + cp -v *.ttf $out/share/fonts/truetype/ 37 + 38 + mkdir -p $out/etc/fonts/conf.d 39 + cp -v *.conf $out/etc/fonts/conf.d 40 + 41 + mkdir -p "$out/share/doc/lohit-${name}" 42 + cp -v ChangeLog* COPYRIGHT* "$out/share/doc/lohit-${name}/" 43 + ''; 44 + 45 + meta = { 46 + inherit license; 47 + homepage = https://fedorahosted.org/lohit/; 48 + maintainers = [ lib.maintainers.mathnerd314 lib.maintainers.ttuegel ]; 49 + # Set a non-zero priority to allow easy overriding of the 50 + # fontconfig configuration files. 51 + priority = 5; 52 + }; 53 + }; 54 + 55 + in 56 + # Technically, GPLv2 with usage exceptions 57 + lib.mapAttrs (mkpkg lib.licenses.gpl2) gplfonts // 58 + lib.mapAttrs (mkpkg lib.licenses.ofl) fonts
+5 -1
pkgs/top-level/all-packages.nix
··· 10577 10577 10578 10578 lobster-two = callPackage ../data/fonts/lobster-two {}; 10579 10579 10580 - lohit-fonts = callPackage ../data/fonts/lohit-fonts { }; 10580 + # lohit-fonts.assamese lohit-fonts.bengali lohit-fonts.devanagari lohit-fonts.gujarati lohit-fonts.gurmukhi 10581 + # lohit-fonts.kannada lohit-fonts.malayalam lohit-fonts.marathi lohit-fonts.nepali lohit-fonts.odia 10582 + # lohit-fonts.tamil-classical lohit-fonts.tamil lohit-fonts.telugu 10583 + # lohit-fonts.kashmiri lohit-fonts.konkani lohit-fonts.maithili lohit-fonts.sindhi 10584 + lohit-fonts = recurseIntoAttrs ( callPackages ../data/fonts/lohit-fonts { } ); 10581 10585 10582 10586 manpages = callPackage ../data/documentation/man-pages { }; 10583 10587