From dbd004ea9bee830402aa410c6b8a0a493efa454b Mon Sep 17 00:00:00 2001 From: midchildan Date: Sat, 28 May 2022 08:24:15 +0900 Subject: [PATCH] xkcd-font: fix build (#174776) * xkcd-font: fix build * xkcd-font: remove dotfiles from output * xkcd-font: add comment --- pkgs/data/fonts/xkcd-font/default.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pkgs/data/fonts/xkcd-font/default.nix b/pkgs/data/fonts/xkcd-font/default.nix index af740e408981..af79e7f1d8f1 100644 --- a/pkgs/data/fonts/xkcd-font/default.nix +++ b/pkgs/data/fonts/xkcd-font/default.nix @@ -11,11 +11,22 @@ in fetchFromGitHub { rev = "5632fde618845dba5c22f14adc7b52bf6c52d46d"; postFetch = '' - tar xf $downloadedFile --strip=1 + pushd $out + install -Dm444 -t $out/share/fonts/opentype/ xkcd/build/xkcd.otf install -Dm444 -t $out/share/fonts/truetype/ xkcd-script/font/xkcd-script.ttf + + # remove unrelated files + for f in * .*; do + case "$f" in + share|.|..) ;; + *) rm -rf "$f" ;; + esac + done + + popd ''; - sha256 = "0xhwa53aiz20763jb9nvbr2zq9k6jl69p07dc4b0apwrrwz0jfr1"; + sha256 = "sha256-ITsJPs+ZXwUWYe2AmwyVZib8RV7bpiWHOUD8qEZRHHY="; meta = with lib; { description = "The xkcd font";