From 5f4906616d18221dedd1e7db3f749b47d54803b0 Mon Sep 17 00:00:00 2001 From: volth Date: Fri, 11 Aug 2017 04:09:15 +0000 Subject: [PATCH] vistafonts: make the font derivation fixed-output - [x] make the font derivation fixed-output (https://github.com/NixOS/nixpkgs/issues/27754) --- pkgs/data/fonts/vista-fonts/default.nix | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/pkgs/data/fonts/vista-fonts/default.nix b/pkgs/data/fonts/vista-fonts/default.nix index 5fea1f795fd3..f84d067eed83 100644 --- a/pkgs/data/fonts/vista-fonts/default.nix +++ b/pkgs/data/fonts/vista-fonts/default.nix @@ -1,24 +1,14 @@ -{stdenv, fetchurl, cabextract}: +{stdenv, fetchzip, cabextract}: -stdenv.mkDerivation { +fetchzip { name = "vista-fonts-1"; - src = fetchurl { - url = http://download.microsoft.com/download/f/5/a/f5a3df76-d856-4a61-a6bd-722f52a5be26/PowerPointViewer.exe; - sha256 = "07vhjdw8iip7gxk6wvp4myhvbn9619g10j9qvpbzz4ihima57ry4"; - }; + url = http://download.microsoft.com/download/f/5/a/f5a3df76-d856-4a61-a6bd-722f52a5be26/PowerPointViewer.exe; - 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 cp *.ttf $out/share/fonts/truetype @@ -31,6 +21,8 @@ stdenv.mkDerivation { done ''; + sha256 = "1q2d24c203vkl6pwk86frmaj6jra49hr9mydq7cnlx4hilqslw3g"; + meta = { description = "Some TrueType fonts from Microsoft Windows Vista (Calibri, Cambria, Candara, Consolas, Constantia, Corbel)"; homepage = http://www.microsoft.com/typography/ClearTypeFonts.mspx;