comfortaa: convert to stdenvNoCC.mkDerivation

+22 -13
+22 -13
pkgs/data/fonts/comfortaa/default.nix
··· 1 - { lib, fetchFromGitHub }: 1 + { lib, stdenvNoCC, fetchFromGitHub }: 2 + 3 + stdenvNoCC.mkDerivation rec { 4 + pname = "comfortaa"; 5 + version = "unstable-2021-07-29"; 2 6 3 - let 4 - version = "2021-07-29"; 5 - in fetchFromGitHub rec { 6 - name = "comfortaa-${version}"; 7 + src = fetchFromGitHub { 8 + owner = "googlefonts"; 9 + repo = pname; 10 + rev = "2a87ac6f6ea3495150bfa00d0c0fb53dd0a2f11b"; 11 + postFetch = '' 12 + # Remove the OTF fonts as they are not needed and cause a hash mismatch 13 + rm -rf $out/fonts/{OTF,otf} 14 + ''; 15 + hash = "sha256-4ZBRaQyYlnt9l4NgBHezuCnR3rKTJ37L41RTbGAhd0M="; 16 + }; 17 + 18 + dontBuild = true; 7 19 8 - owner = "googlefonts"; 9 - repo = "comfortaa"; 10 - rev = "2a87ac6f6ea3495150bfa00d0c0fb53dd0a2f11b"; 20 + installPhase = '' 21 + runHook preInstall 11 22 12 - postFetch = '' 13 - tar -xf $downloadedFile --strip=1 14 23 mkdir -p $out/share/fonts/truetype $out/share/doc/comfortaa 15 24 cp fonts/TTF/*.ttf $out/share/fonts/truetype 16 25 cp FONTLOG.txt README.md $out/share/doc/comfortaa 17 - ''; 18 26 19 - sha256 = "12ad7qy11q49iv9h3l2d7x7y7kf0hxbqhclb92bzwig8dzly9n2k"; 27 + runHook postInstall 28 + ''; 20 29 21 30 meta = with lib; { 22 31 homepage = "http://aajohan.deviantart.com/art/Comfortaa-font-105395949"; 23 32 description = "A clean and modern font suitable for headings and logos"; 24 33 license = licenses.ofl; 25 34 platforms = platforms.all; 26 - maintainers = [maintainers.rycee]; 35 + maintainers = [ maintainers.rycee ]; 27 36 }; 28 37 }