From 576e9aacc0cde8cc47b0cbb0849325d5c7ed148d Mon Sep 17 00:00:00 2001 From: volth Date: Fri, 11 Aug 2017 03:50:44 +0000 Subject: [PATCH] ipafont: make the font derivation fixed-output - [x] make the font derivations fixed-output (https://github.com/NixOS/nixpkgs/issues/27754) --- pkgs/data/fonts/ipafont/default.nix | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/pkgs/data/fonts/ipafont/default.nix b/pkgs/data/fonts/ipafont/default.nix index 1f37630835d9..c056f14f46fd 100644 --- a/pkgs/data/fonts/ipafont/default.nix +++ b/pkgs/data/fonts/ipafont/default.nix @@ -1,23 +1,16 @@ -{ stdenv, fetchurl, unzip }: +{ stdenv, fetchzip }: -stdenv.mkDerivation { +fetchzip { name = "ipafont-003.03"; - src = fetchurl { - url = "http://ipafont.ipa.go.jp/old/ipafont/IPAfont00303.php"; - sha256 = "f755ed79a4b8e715bed2f05a189172138aedf93db0f465b4e20c344a02766fe5"; - }; + url = "http://ipafont.ipa.go.jp/old/ipafont/IPAfont00303.php"; - buildInputs = [ unzip ]; - - unpackPhase = '' - unzip $src + postFetch = '' + mkdir -p $out/share/fonts + unzip -j $downloadedFile \*.ttf -d $out/share/fonts/opentype ''; - installPhase = '' - mkdir -p $out/share/fonts/opentype - cp ./IPAfont00303/*.ttf $out/share/fonts/opentype/ - ''; + sha256 = "0lrjd0bfy36f9j85m12afg5nvr5id3sig2nmzs5qifskbd7mqv9h"; meta = { description = "Japanese font package with Mincho and Gothic fonts";