1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 22:50:49 +00:00

vistafonts: fix build

Build was previously failing with
```
/build/file: no valid cabinets found
```

Additonaly, a faster download mirror is used. The downloaded file is not identical to the one from the previous mirror, but the produced result is unchanged.
This commit is contained in:
Eduardo Sánchez Muñoz 2021-03-25 19:05:55 +01:00
parent 06733bcf29
commit a49e2d27f6

View file

@ -1,14 +1,22 @@
{ lib, fetchzip, cabextract }:
{ lib, stdenvNoCC, fetchurl, cabextract }:
fetchzip {
name = "vista-fonts-1";
stdenvNoCC.mkDerivation {
pname = "vista-fonts";
version = "1";
url = "https://web.archive.org/web/20171225132744/http://download.microsoft.com/download/E/6/7/E675FFFC-2A6D-4AB0-B3EB-27C9F8C8F696/PowerPointViewer.exe";
src = fetchurl {
url = "mirror://sourceforge/mscorefonts2/cabs/PowerPointViewer.exe";
sha256 = "07vhjdw8iip7gxk6wvp4myhvbn9619g10j9qvpbzz4ihima57ry4";
};
postFetch = ''
${cabextract}/bin/cabextract --lowercase --filter ppviewer.cab $downloadedFile
${cabextract}/bin/cabextract --lowercase --filter '*.TTF' ppviewer.cab
nativeBuildInputs = [ cabextract ];
unpackPhase = ''
cabextract --lowercase --filter ppviewer.cab $src
cabextract --lowercase --filter '*.TTF' ppviewer.cab
'';
installPhase = ''
mkdir -p $out/share/fonts/truetype
cp *.ttf $out/share/fonts/truetype
@ -21,8 +29,6 @@ fetchzip {
done
'';
sha256 = "sha256-x7JSXS9Q1fzlJTVR+MAS3f2+cmo/H0s1qkY9FPjx2zI=";
meta = {
description = "Some TrueType fonts from Microsoft Windows Vista (Calibri, Cambria, Candara, Consolas, Constantia, Corbel)";
homepage = "http://www.microsoft.com/typography/ClearTypeFonts.mspx";