wqy_microhei: 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:10:51 +00:00 committed by Franz Pletz
parent e8fc26fdb2
commit 9baf0b76b7

View file

@ -1,14 +1,16 @@
{ stdenv, fetchurl }:
{ stdenv, fetchzip }:
stdenv.mkDerivation rec {
fetchzip rec {
name = "wqy-microhei-0.2.0-beta";
src = fetchurl {
url = "mirror://sourceforge/wqy/${name}.tar.gz";
sha256 = "0gi1yxqph8xx869ichpzzxvx6y50wda5hi77lrpacdma4f0aq0i8";
};
url = "mirror://sourceforge/wqy/${name}.tar.gz";
installPhase = ''install -Dm644 wqy-microhei.ttc $out/share/fonts/wqy-microhei.ttc'';
postFetch = ''
tar -xzf $downloadedFile --strip-components=1
install -Dm644 wqy-microhei.ttc $out/share/fonts/wqy-microhei.ttc
'';
sha256 = "0i5jh7mkp371fxqmsvn7say075r641yl4hq26isjyrqvb8cv92a9";
meta = {
description = "A (mainly) Chinese Unicode font";