From e26ba260421a52e5f0e2436ade58ff5db04e830f Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Thu, 23 Feb 2023 20:28:44 -0800 Subject: [PATCH] twemoji: apply nixpkgs changes --- modules/twemoji/default.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/modules/twemoji/default.nix b/modules/twemoji/default.nix index db7342a..c49aa97 100644 --- a/modules/twemoji/default.nix +++ b/modules/twemoji/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl }: +{ pkgs, lib, stdenv }: let _fedrel = "2.fc37"; @@ -7,15 +7,24 @@ stdenv.mkDerivation rec { pname = "ttf-twemoji"; version = "14.0.2"; - src = builtins.fetchTarball { + src = pkgs.fetchurl { url = "https://kojipkgs.fedoraproject.org/packages/twitter-twemoji-fonts/${version}/${_fedrel}/noarch/twitter-twemoji-fonts-${version}-${_fedrel}.noarch.rpm"; - sha256 = "sha256:11ay3jc4qd3z1mnijnwdns4bi22y204lva7l7vkazybx1nzrwscl"; + hash = "sha256-GK7JZzHs/9gSViSTPPv3V/LFfdGzj4F50VO5HSqs0VE="; }; + nativeBuildInputs = with pkgs; [ + rpm + cpio + ]; + + unpackPhase = '' + rpm2cpio $src | cpio -i --make-directories + ''; + dontBuild = true; installPhase = '' - install -Dm755 share/fonts/twemoji/Twemoji.ttf $out/share/fonts/truetype/Twemoji.ttf + install -Dm755 usr/share/fonts/twemoji/Twemoji.ttf $out/share/fonts/truetype/Twemoji.ttf ''; meta = with lib; {