From 7c79bb6a87a07cad21482fa570ce2208cfe704eb Mon Sep 17 00:00:00 2001 From: volth Date: Fri, 11 Aug 2017 04:51:52 +0000 Subject: [PATCH] font-awesome-ttf: make the font derivation fixed-output - [x] make the font derivation fixed-output (https://github.com/NixOS/nixpkgs/issues/27754) --- pkgs/data/fonts/font-awesome-ttf/default.nix | 22 +++++++++----------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/pkgs/data/fonts/font-awesome-ttf/default.nix b/pkgs/data/fonts/font-awesome-ttf/default.nix index bc564a80d923..34548b972442 100644 --- a/pkgs/data/fonts/font-awesome-ttf/default.nix +++ b/pkgs/data/fonts/font-awesome-ttf/default.nix @@ -1,21 +1,19 @@ -{ stdenv, fetchFromGitHub }: +{ stdenv, fetchzip }: -stdenv.mkDerivation rec { - name = "font-awesome-${version}"; +let version = "4.7.0"; +in fetchzip rec { + name = "font-awesome-${version}"; - src = fetchFromGitHub { - owner = "FortAwesome"; - repo = "Font-Awesome"; - rev = "v${version}"; - sha256 = "0w30y26jp8nvxa3iiw7ayl6rkza1rz62msl9xw3srvxya1c77grc"; - }; + url = "https://github.com/FortAwesome/Font-Awesome/archive/v${version}.zip"; - buildCommand = '' - mkdir -p $out/share/fonts/truetype - cp $src/fonts/*.ttf $out/share/fonts/truetype + postFetch = '' + mkdir -p $out/share/fonts + unzip -j $downloadedFile Font-Awesome-${version}/fonts/fontawesome-webfont.ttf -d $out/share/fonts/truetype ''; + sha256 = "0w8y7gxbqiy444phg4jl89kc5hq3jffbkhab8p110qy9jx8s106s"; + meta = with stdenv.lib; { description = "Font Awesome - TTF font"; longDescription = ''