vistafonts: make the font derivation fixed-output

- [x] make the font derivation fixed-output (https://github.com/NixOS/nixpkgs/issues/27754)
This commit is contained in:
volth 2017-08-11 04:09:15 +00:00 committed by Franz Pletz
parent 9baf0b76b7
commit 5f4906616d

View File

@ -1,24 +1,14 @@
{stdenv, fetchurl, cabextract}: {stdenv, fetchzip, cabextract}:
stdenv.mkDerivation { fetchzip {
name = "vista-fonts-1"; name = "vista-fonts-1";
src = fetchurl { url = http://download.microsoft.com/download/f/5/a/f5a3df76-d856-4a61-a6bd-722f52a5be26/PowerPointViewer.exe;
url = http://download.microsoft.com/download/f/5/a/f5a3df76-d856-4a61-a6bd-722f52a5be26/PowerPointViewer.exe;
sha256 = "07vhjdw8iip7gxk6wvp4myhvbn9619g10j9qvpbzz4ihima57ry4";
};
buildInputs = [cabextract]; postFetch = ''
${cabextract}/bin/cabextract --lowercase --filter ppviewer.cab $downloadedFile
${cabextract}/bin/cabextract --lowercase --filter '*.TTF' ppviewer.cab
unpackPhase = ''
cabextract --lowercase --filter ppviewer.cab $src
cabextract --lowercase --filter '*.TTF' ppviewer.cab
sourceRoot=.
'';
dontBuild = true;
installPhase = ''
mkdir -p $out/share/fonts/truetype mkdir -p $out/share/fonts/truetype
cp *.ttf $out/share/fonts/truetype cp *.ttf $out/share/fonts/truetype
@ -31,6 +21,8 @@ stdenv.mkDerivation {
done done
''; '';
sha256 = "1q2d24c203vkl6pwk86frmaj6jra49hr9mydq7cnlx4hilqslw3g";
meta = { meta = {
description = "Some TrueType fonts from Microsoft Windows Vista (Calibri, Cambria, Candara, Consolas, Constantia, Corbel)"; description = "Some TrueType fonts from Microsoft Windows Vista (Calibri, Cambria, Candara, Consolas, Constantia, Corbel)";
homepage = http://www.microsoft.com/typography/ClearTypeFonts.mspx; homepage = http://www.microsoft.com/typography/ClearTypeFonts.mspx;