diff options
author | AndersonTorres <torres.anderson.85@protonmail.com> | 2020-09-14 01:25:40 -0300 |
---|---|---|
committer | AndersonTorres <torres.anderson.85@protonmail.com> | 2020-09-21 23:37:31 -0300 |
commit | a3323d493453e2e752f7e41fcb53df08249937a6 (patch) | |
tree | d01aa2cb03586cb665dde249ecb1effecfe013cc /pkgs/data | |
parent | 1a3b6ccf66e21acd230d0b03b2aa43940c5c5f7c (diff) | |
download | nixpkgs-a3323d493453e2e752f7e41fcb53df08249937a6.tar nixpkgs-a3323d493453e2e752f7e41fcb53df08249937a6.tar.gz nixpkgs-a3323d493453e2e752f7e41fcb53df08249937a6.tar.bz2 nixpkgs-a3323d493453e2e752f7e41fcb53df08249937a6.tar.lz nixpkgs-a3323d493453e2e752f7e41fcb53df08249937a6.tar.xz nixpkgs-a3323d493453e2e752f7e41fcb53df08249937a6.tar.zst nixpkgs-a3323d493453e2e752f7e41fcb53df08249937a6.zip |
comic-neue: 2.3 -> 2.5
Diffstat (limited to 'pkgs/data')
-rw-r--r-- | pkgs/data/fonts/comic-neue/default.nix | 54 |
1 files changed, 33 insertions, 21 deletions
diff --git a/pkgs/data/fonts/comic-neue/default.nix b/pkgs/data/fonts/comic-neue/default.nix index 709d93dc2c9..d50e8974342 100644 --- a/pkgs/data/fonts/comic-neue/default.nix +++ b/pkgs/data/fonts/comic-neue/default.nix @@ -1,32 +1,44 @@ -{ lib, fetchzip }: +{ stdenv, fetchzip }: -let - version = "2.3"; -in fetchzip rec { - name = "comic-neue-${version}"; +stdenv.mkDerivation rec { + pname = "comic-neue"; + version = "2.5"; - url = "http://comicneue.com/${name}.zip"; + src = fetchzip { + url = "http://comicneue.com/${pname}-${version}.zip"; + sha256 = "1kc0yyha6cc584vcl9z1cq1z6prgkxk93g75mr8gapfdrj25dp3q"; + stripRoot = false; # because it comes with a __MACOSX directory + }; - postFetch = '' - mkdir -vp $out/share/{doc,fonts} - unzip -j $downloadedFile OTF/\*.otf -d $out/share/fonts/opentype - unzip -j $downloadedFile Web/\*.ttf -d $out/share/fonts/truetype - unzip -j $downloadedFile Web/\*.eot -d $out/share/fonts/EOT - unzip -j $downloadedFile Web/\*.woff -d $out/share/fonts/WOFF - unzip -j $downloadedFile Web/\*.woff2 -d $out/share/fonts/WOFF2 - unzip -j $downloadedFile \*.pdf FONTLOG.txt OFL-FAQ.txt SIL-License.txt -d $out/share/doc/${name} - ''; + phases = [ "unpackPhase" "installPhase" ]; - sha256 = "1gs4vhys0m3qsw06qaxzyi81f06w5v66kbyl64yw3pq2rb656779"; + installPhase = '' + mkdir -pv $out/share/{doc/${pname}-${version},fonts/{opentype,truetype,EOT,WOFF,WOFF2}} + cp -v ${pname}-${version}/{FONTLOG,OFL-FAQ,OFL}.txt $out/share/doc/ + cp -v ${pname}-${version}/OTF/ComicNeue-Angular/*.otf $out/share/fonts/opentype + cp -v ${pname}-${version}/OTF/ComicNeue/*.otf $out/share/fonts/opentype + cp -v ${pname}-${version}/TTF/ComicNeue-Angular/*.ttf $out/share/fonts/truetype + cp -v ${pname}-${version}/TTF/ComicNeue/*.ttf $out/share/fonts/truetype + cp -v ${pname}-${version}/WebFonts/eot/ComicNeue-Angular/*.eot $out/share/fonts/EOT + cp -v ${pname}-${version}/WebFonts/eot/ComicNeue/*.eot $out/share/fonts/EOT + cp -v ${pname}-${version}/WebFonts/woff/ComicNeue-Angular/*.woff $out/share/fonts/WOFF + cp -v ${pname}-${version}/WebFonts/woff/ComicNeue/*.woff $out/share/fonts/WOFF + cp -v ${pname}-${version}/WebFonts/woff2/ComicNeue/*.woff2 $out/share/fonts/WOFF2 + + # Quick fix for conflicting names in upstream + for i in ${pname}-${version}/WebFonts/woff2/ComicNeue-Angular/*.woff2; do + cp -v $i $out/share/fonts/WOFF2/`basename $i|sed -e 's|ComicNeue|ComicNeue-Angular|'` + done + ''; - meta = with lib; { + meta = with stdenv.lib; { homepage = "http://comicneue.com/"; description = "A casual type face: Make your lemonade stand look like a fortune 500 company"; longDescription = '' - It is inspired by Comic Sans but more regular. The font was - designed by Craig Rozynski. It is available in two variants: - Comic Neue and Comic Neue Angular. The former having round and - the latter angular terminals. Both variants come in Light, + ComicNeue is inspired by Comic Sans but more regular. It was + designed by Craig Rozynski. It is available in two variants: + Comic Neue and Comic Neue Angular. The former having round and + the latter angular terminals. Both variants come in Light, Regular, and Bold weights with Oblique variants. ''; license = licenses.ofl; |