From 6bf957027946a90c7de8cda95a433132f88509f0 Mon Sep 17 00:00:00 2001 From: midchildan Date: Fri, 27 May 2022 03:01:16 +0900 Subject: [PATCH 1/3] xkcd-font: fix build (cherry picked from commit ef97620b668a5c8d1ac7fee56be7feab9c5e53cf) --- pkgs/data/fonts/xkcd-font/default.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/data/fonts/xkcd-font/default.nix b/pkgs/data/fonts/xkcd-font/default.nix index af740e4089814..2778c5f4472fa 100644 --- a/pkgs/data/fonts/xkcd-font/default.nix +++ b/pkgs/data/fonts/xkcd-font/default.nix @@ -11,11 +11,18 @@ 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 + for f in *; do + [[ "$f" == share ]] && continue + rm -rf "$f" + done + + popd ''; - sha256 = "0xhwa53aiz20763jb9nvbr2zq9k6jl69p07dc4b0apwrrwz0jfr1"; + sha256 = "sha256-oBDP4LG8csjvzSk1+EcPH6hcp44dWtPzVFSifzBq8lU="; meta = with lib; { description = "The xkcd font"; From 72727d16fef93f3c0a1bf6fbee068b7e1aa0ada2 Mon Sep 17 00:00:00 2001 From: midchildan Date: Fri, 27 May 2022 03:15:12 +0900 Subject: [PATCH 2/3] xkcd-font: remove dotfiles from output (cherry picked from commit 736905b7e8f52c32683a17259e17a31bd5c8f285) --- pkgs/data/fonts/xkcd-font/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/data/fonts/xkcd-font/default.nix b/pkgs/data/fonts/xkcd-font/default.nix index 2778c5f4472fa..27566e123d33f 100644 --- a/pkgs/data/fonts/xkcd-font/default.nix +++ b/pkgs/data/fonts/xkcd-font/default.nix @@ -15,14 +15,16 @@ in fetchFromGitHub { install -Dm444 -t $out/share/fonts/opentype/ xkcd/build/xkcd.otf install -Dm444 -t $out/share/fonts/truetype/ xkcd-script/font/xkcd-script.ttf - for f in *; do - [[ "$f" == share ]] && continue - rm -rf "$f" + for f in * .*; do + case "$f" in + share|.|..) ;; + *) rm -rf "$f" ;; + esac done popd ''; - sha256 = "sha256-oBDP4LG8csjvzSk1+EcPH6hcp44dWtPzVFSifzBq8lU="; + sha256 = "sha256-ITsJPs+ZXwUWYe2AmwyVZib8RV7bpiWHOUD8qEZRHHY="; meta = with lib; { description = "The xkcd font"; From 01895ff5df3c75b99528012648c6e139db7cc664 Mon Sep 17 00:00:00 2001 From: midchildan Date: Sat, 28 May 2022 03:43:16 +0900 Subject: [PATCH 3/3] xkcd-font: add comment (cherry picked from commit 05e4997ae97743d7fa096134d620aff4290ab7c8) --- pkgs/data/fonts/xkcd-font/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/data/fonts/xkcd-font/default.nix b/pkgs/data/fonts/xkcd-font/default.nix index 27566e123d33f..af79e7f1d8f17 100644 --- a/pkgs/data/fonts/xkcd-font/default.nix +++ b/pkgs/data/fonts/xkcd-font/default.nix @@ -15,6 +15,8 @@ in fetchFromGitHub { 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|.|..) ;;