diff --git a/modules/polybar/aozora.nix b/modules/polybar/aozora.nix index 3391cc3..9915750 100644 --- a/modules/polybar/aozora.nix +++ b/modules/polybar/aozora.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, fetchgit, rustPlatform }: +{ pkgs, lib, fetchFromGitea, rustPlatform }: rustPlatform.buildRustPackage rec { pname = "aozora"; @@ -7,8 +7,10 @@ rustPlatform.buildRustPackage rec { buildInputs = with pkgs; [ openssl ]; nativeBuildInputs = with pkgs; [ pkg-config ]; - src = fetchgit { - url = "https://git.elnu.com/ElnuDev/aozora"; + src = fetchFromGitea { + domain = "git.elnu.com"; + owner = "ElnuDev"; + repo = "aozora"; rev = version; sha256 = "93MP1Iw1eklC+IEQXAhzLHJ+qsDASm53qw7vUEtEstI="; }; 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; {