carlito: Use stdenvNoCC.mkDerivation

carlito used to call `fetchzip` directly, and the fact that it was a
fixed-output derivation meant nobody noticed that:

1. the derivation no longer built from source (due to changes in
   `fetchzip`), and

2. the updated fontconfig xml never got used.
This commit is contained in:
Jack Kelly 2022-12-06 15:31:47 +10:00
parent 4f4073186f
commit ad8edb6259

View file

@ -1,22 +1,21 @@
{ lib, fetchzip }:
{ lib, fetchzip, stdenvNoCC }:
let
stdenvNoCC.mkDerivation rec {
pname = "carlito";
version = "20130920";
in fetchzip {
name = "carlito-${version}";
url = "https://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/crosextrafonts-carlito-${version}.tar.gz";
src = fetchzip {
url = "https://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/crosextrafonts-carlito-${version}.tar.gz";
sha256 = "sha256-OGDO5WoF7OmiRdLRRrIXMzg276Pgeq1L3Offcl0W2jg=";
};
postFetch = ''
tar -xzvf $downloadedFile --strip-components=1
installPhase = ''
mkdir -p $out/etc/fonts/conf.d
mkdir -p $out/share/fonts/truetype
cp -v *.ttf $out/share/fonts/truetype
cp -v $src/*.ttf $out/share/fonts/truetype
cp -v ${./calibri-alias.conf} $out/etc/fonts/conf.d/30-calibri.conf
'';
sha256 = "0d72zy6kdmxgpi63r3yvi3jh1hb7lvlgv8hgd4ag0x10dz18mbzv";
meta = with lib; {
# This font doesn't appear to have any official web site but this
# one provides some good information and samples.
@ -25,7 +24,7 @@ in fetchzip {
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.
of the tyPoland foundry and based upon his Lato font.
'';
license = licenses.ofl;
platforms = platforms.all;