From 6cab82d1b4e4efa4d9621b64938a0dac1d641d38 Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Sun, 17 Dec 2017 13:17:45 +0000 Subject: [PATCH] myrica: fix build on darwin --- pkgs/data/fonts/myrica/default.nix | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/pkgs/data/fonts/myrica/default.nix b/pkgs/data/fonts/myrica/default.nix index 15c7d5afe2f..f3be8857284 100644 --- a/pkgs/data/fonts/myrica/default.nix +++ b/pkgs/data/fonts/myrica/default.nix @@ -1,28 +1,20 @@ -{ stdenv, fetchFromGitHub }: +{ lib, fetchFromGitHub }: -stdenv.mkDerivation rec { - name = "myrica-${version}"; - version = "2.011.20160403"; +fetchFromGitHub rec { + name = "myrica-2.011.20160403"; - src = fetchFromGitHub { - owner = "tomokuni"; - repo = "Myrica"; - rev = "b737107723bfddd917210f979ccc32ab3eb6dc20"; - sha256 = "0p95kanf1682d9idq4v9agxlvxh08vhvfid2sjyc63knndsrl7wk"; - }; + owner = "tomokuni"; + repo = "Myrica"; + rev = "b737107723bfddd917210f979ccc32ab3eb6dc20"; + sha256 = "187rklcibbkai6m08173ca99qn8v7xpdfdv0izpymmavj85axm12"; - phases = [ "installPhase" ]; - - installPhase = '' + postFetch = '' + tar --strip-components=1 -xzvf $downloadedFile mkdir -p $out/share/fonts/truetype - cp $src/product/*.TTC $out/share/fonts/truetype + cp product/*.TTC $out/share/fonts/truetype ''; - outputHashAlgo = "sha256"; - outputHashMode = "recursive"; - outputHash = "187rklcibbkai6m08173ca99qn8v7xpdfdv0izpymmavj85axm12"; - - meta = with stdenv.lib; { + meta = with lib; { homepage = https://myrica.estable.jp/; license = licenses.ofl; maintainers = with maintainers; [ mikoim ];