From patchwork Thu Mar 21 21:37:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: normally_js X-Patchwork-Id: 62115 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7D50E27BBEA; Thu, 21 Mar 2024 21:40:41 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C7B6E27BBE2 for ; Thu, 21 Mar 2024 21:40:40 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rnQ9I-0003T5-AY; Thu, 21 Mar 2024 17:40:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rnQ9E-0003Sa-SV for guix-patches@gnu.org; Thu, 21 Mar 2024 17:40:28 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rnQ9D-0003sU-2Q for guix-patches@gnu.org; Thu, 21 Mar 2024 17:40:28 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rnQ9m-0004ad-Sm; Thu, 21 Mar 2024 17:41:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69933] [PATCH 1/2] gnu: Add font-symbols-nerd. Resent-From: normally_js Original-Sender: "Debbugs-submit" Resent-CC: all_but_last@163.com, iyzsong@envs.net, guix-patches@gnu.org Resent-Date: Thu, 21 Mar 2024 21:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69933 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69933@debbugs.gnu.org Cc: normally_js , Zhu Zihao , =?utf-8?b?5a6L5paH5q2m?= X-Debbugs-Original-Xcc: Zhu Zihao , =?utf-8?b?5a6L5paH?= =?utf-8?b?5q2m?= Received: via spool by 69933-submit@debbugs.gnu.org id=B69933.171105722517505 (code B ref 69933); Thu, 21 Mar 2024 21:41:02 +0000 Received: (at 69933) by debbugs.gnu.org; 21 Mar 2024 21:40:25 +0000 Received: from localhost ([127.0.0.1]:38307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnQ9A-0004YE-SP for submit@debbugs.gnu.org; Thu, 21 Mar 2024 17:40:25 -0400 Received: from mout02.posteo.de ([185.67.36.66]:39549) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnQ7u-0004Rz-3U for 69933@debbugs.gnu.org; Thu, 21 Mar 2024 17:39:07 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 99D58240104 for <69933@debbugs.gnu.org>; Thu, 21 Mar 2024 22:38:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1711057099; bh=JcLcQ1iYJfBUJE9mlhjihYR5DZm9upC+0c23fVspe58=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=XUbLGMwjKVug0rFYq73FfjizTwUWot4hA6T/AY5NqrIxnWKDXFX5OkovFY5EnbLWi StsZ0uCk6175fSUhVSDKCpTVNRTl9QQsPVxGA/GHrYW1ZWohBaZMZ2p+Pohs9Tg8cX wrG1phXQreXLgrwLTfHzIsi9uNkp4TKJJBnunfHXizi7Y4K+UeVvA7h9+Pd7sMgEi/ MDB6cz+YtVJzamlOiosSyFbboUIINfAATgMcxkDgVL/M1Vo3Nb0GISJCysc7pFJtdV aT+DouPTv99eOFcJ+YIFhiprZ77hmO1af5HL+fTyvJ0XgujLozUuEvdOW2RlAWHdnj Dr39zVGQOAS8A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4V0zNB5Q7Pz9rxD; Thu, 21 Mar 2024 22:38:18 +0100 (CET) From: normally_js Date: Thu, 21 Mar 2024 21:37:56 +0000 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/fonts.scm (font-symbols-nerd): New variable. Change-Id: I9ce3b60a775bffeff8ca3a9ebbd90f66ebf614ff --- gnu/packages/fonts.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm index 9ec722c19c..7ab576b506 100644 --- a/gnu/packages/fonts.scm +++ b/gnu/packages/fonts.scm @@ -60,6 +60,7 @@ ;;; Copyright © 2023 chris ;;; Copyright © 2023, 2024 Luis Felipe López Acevedo ;;; Copyright © 2024 Christina O'Donnell +;;; Copyright © 2024 normally_js ;;; ;;; This file is part of GNU Guix. ;;; @@ -3578,6 +3579,29 @@ (define-public font-scientifica Most characters are just 4px wide, which is brilliant for low dpi(90-120) displays.") (license license:silofl1.1))) +(define-public font-symbols-nerd + (package + (name "font-symbols-nerd") + (version "3.1.1") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/ryanoasis/nerd-fonts/releases/download/v" + version + "/NerdFontsSymbolsOnly.zip")) + (sha256 + (base32 "0xka49qk3r5m3jgpk3fi9b7j593fflg287ck99k12p8czqz62r4c")))) + (build-system font-build-system) + (home-page "https://www.nerdfonts.com/") + (synopsis "Nerd Font symbols standalone package") + (description + "This package provides just the Nerd Font icons that can be used to patch +fonts for icon support or provide glyph support to user interfaces. It +provides a high number of glyphs in addition to those found in 'iconic' fonts +like Font Awesome.") + (license license:expat))) + (define-public font-tuffy (package (name "font-tuffy") From patchwork Thu Mar 21 21:37:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: normally_js X-Patchwork-Id: 62114 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 50C3A27BBE9; Thu, 21 Mar 2024 21:39:41 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED,URIBL_SBL_A autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1EECF27BBE2 for ; Thu, 21 Mar 2024 21:39:39 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rnQ8G-00037e-8V; Thu, 21 Mar 2024 17:39:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rnQ8E-00037R-Iv for guix-patches@gnu.org; Thu, 21 Mar 2024 17:39:26 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rnQ8E-0003Ts-Aq for guix-patches@gnu.org; Thu, 21 Mar 2024 17:39:26 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rnQ8o-0004W4-EM; Thu, 21 Mar 2024 17:40:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69933] [PATCH 2/2] gnu: emacs-nerd-icons: Patch out installer. Resent-From: normally_js Original-Sender: "Debbugs-submit" Resent-CC: andrew@trop.in, cox.katherine.e+guix@gmail.com, liliana.prikler@gmail.com, guix-patches@gnu.org Resent-Date: Thu, 21 Mar 2024 21:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69933 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69933@debbugs.gnu.org Cc: normally_js , Andrew Tropin , Katherine Cox-Buday , Liliana Marie Prikler X-Debbugs-Original-Xcc: Andrew Tropin , Katherine Cox-Buday , Liliana Marie Prikler Received: via spool by 69933-submit@debbugs.gnu.org id=B69933.171105717417265 (code B ref 69933); Thu, 21 Mar 2024 21:40:02 +0000 Received: (at 69933) by debbugs.gnu.org; 21 Mar 2024 21:39:34 +0000 Received: from localhost ([127.0.0.1]:38208 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnQ8L-0004UJ-Iy for submit@debbugs.gnu.org; Thu, 21 Mar 2024 17:39:34 -0400 Received: from mout01.posteo.de ([185.67.36.65]:58675) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnQ8I-0004Tj-Iz for 69933@debbugs.gnu.org; Thu, 21 Mar 2024 17:39:32 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id C2A95240028 for <69933@debbugs.gnu.org>; Thu, 21 Mar 2024 22:38:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1711057124; bh=bWtMxZklQVbgJPZu82cIOwG/P3v4wtP1nXejG4Sd2HA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=mSbMPA9pK2W+I9mmfGhYG9bStZ89RelvBhK0TUwz+0633WN6ahzWEt+X0OE8fy9+f Ue4Oy9S94OvZ9pkv3Q3iaABr8SshBY3DEN9FzDtfedWSIkHOV0S99Kk2tTjjehoGNw xX390UCdd0G+dnyKoAFPKxvatx0gUNx7lKR5vtTiNmgeZD2C4Hf3Yw8gvxtNPiQs9c jEabdNspquBNaF/7RDHqimZj2sFNKLUuIXlEVRD3zn5yHupmAXoAjdLL4F1YmjR8eO M+hRuEpmFxQ0JyabQVqhnQiWSYBcrA9DA47ItEnN50B2PS2nuosJ+QCSa9Kuj36qrl mmtPxVp4OmTcQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4V0zNg6mkpz9rxD; Thu, 21 Mar 2024 22:38:43 +0100 (CET) From: normally_js Date: Thu, 21 Mar 2024 21:37:57 +0000 Message-ID: <3412014f759a856f5e3b571c4229a15bde177882.1711056678.git.normally_js@posteo.net> In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Instead of relying on the built-in installer script to collect the nerd font icons files (which is unstable since it downloads a blob from the master branch of the same repository), we can propagate the `font-symbols-nerd' package. * gnu/packages/patches/emacs-nerd-icons-remove-installer.patch: New file. * gnu/local.mk (dist_patch_DATA): Register emacs-nerd-icons-remove-installer.patch. * gnu/packages/emacs-xyz.scm (emacs-nerd-icons) [source]: Apply emacs-nerd-icons-remove-installer.patch. [propagated-inputs]: Add font-symbols-nerd. Change-Id: I712fcfe67512837fa7db59546d7492c3a7755561 --- gnu/local.mk | 2 + gnu/packages/emacs-xyz.scm | 4 ++ .../emacs-nerd-icons-remove-installer.patch | 59 +++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 gnu/packages/patches/emacs-nerd-icons-remove-installer.patch diff --git a/gnu/local.mk b/gnu/local.mk index 7f1006010b..0f99730a68 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -64,6 +64,7 @@ # Copyright © 2023 Herman Rimm # Copyright © 2023 Troy Figiel # Copyright © 2024 David Elsing +# Copyright © 2024 normally_js # # This file is part of GNU Guix. # @@ -1985,6 +1986,7 @@ dist_patch_DATA = \ %D%/packages/patches/racket-rktio-bin-sh.patch \ %D%/packages/patches/racket-zuo-bin-sh.patch \ %D%/packages/patches/remake-impure-dirs.patch \ + %D%/packages/patches/emacs-nerd-icons-remove-installer.patch \ %D%/packages/patches/restartd-update-robust.patch \ %D%/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch \ %D%/packages/patches/rng-tools-revert-build-randstat.patch \ diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index eadc8eeb67..4c0a7d815f 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -138,6 +138,7 @@ ;;; Copyright © 2023 Ian Eure ;;; Copyright © 2024 Suhail Singh ;;; Copyright © 2024 dan +;;; Copyright © 2024 normally_js ;;; ;;; This file is part of GNU Guix. ;;; @@ -28906,12 +28907,15 @@ (define-public emacs-nerd-icons (method git-fetch) (uri (git-reference (url home-page) (commit version))) (file-name (git-file-name name version)) + (patches + (search-patches "emacs-nerd-icons-remove-installer.patch")) (sha256 (base32 "0ggj6lm02m7nb5gxnqs2v2lkxsclml6kq176vam9qyg1fsm7yvdw")))) (build-system emacs-build-system) (arguments (list #:include #~(cons "^data\\/" %default-include))) + (propagated-inputs (list font-symbols-nerd)) (synopsis "Library for easily using nerd font icons inside Emacs") (description "Nerd-icons an alternative to all-the-icons. It works on both GUI and terminal, and requires a nerd font installed on your system.") diff --git a/gnu/packages/patches/emacs-nerd-icons-remove-installer.patch b/gnu/packages/patches/emacs-nerd-icons-remove-installer.patch new file mode 100644 index 0000000000..1edc1fcd91 --- /dev/null +++ b/gnu/packages/patches/emacs-nerd-icons-remove-installer.patch @@ -0,0 +1,59 @@ +From d6e6f3bda3f7267e54be153d985f48accc8b21ae Mon Sep 17 00:00:00 2001 +From: normally_js +Date: Thu, 21 Mar 2024 16:47:34 -0400 +Subject: [PATCH] Remove nerd-icons-install-fonts procedure. + +--- + nerd-icons.el | 36 ------------------------------------ + 1 file changed, 36 deletions(-) + +diff --git a/nerd-icons.el b/nerd-icons.el +index 0b7b02d..a5e3d49 100644 +--- a/nerd-icons.el ++++ b/nerd-icons.el +@@ -963,42 +963,6 @@ string." + (cons candidate-name candidate-icon))) + data))) + +-;;;###autoload +-(defun nerd-icons-install-fonts (&optional pfx) +- "Helper function to download and install the latests fonts based on OS. +-The provided Nerd Font is Symbols Nerd Font Mono. +-When PFX is non-nil, ignore the prompt and just install" +- (interactive "P") +- (when (or pfx (yes-or-no-p "This will download and install fonts, are you sure you want to do this?")) +- (let* ((url-format "https://raw.githubusercontent.com/rainstormstudio/nerd-icons.el/main/fonts/%s") +- (font-dest (cond +- ;; Default Linux install directories +- ((member system-type '(gnu gnu/linux gnu/kfreebsd)) +- (concat (or (getenv "XDG_DATA_HOME") +- (concat (getenv "HOME") "/.local/share")) +- "/fonts/" +- nerd-icons-fonts-subdirectory)) +- ;; Default MacOS install directory +- ((eq system-type 'darwin) +- (concat (getenv "HOME") +- "/Library/Fonts/" +- nerd-icons-fonts-subdirectory)))) +- (known-dest? (stringp font-dest)) +- (font-dest (or font-dest (read-directory-name "Font installation directory: " "~/")))) +- +- (unless (file-directory-p font-dest) (mkdir font-dest t)) +- +- (mapc (lambda (font) +- (url-copy-file (format url-format font) (expand-file-name font font-dest) t)) +- nerd-icons-font-names) +- (when known-dest? +- (message "Fonts downloaded, updating font cache... ") +- (shell-command-to-string (format "fc-cache -f -v"))) +- (message "%s Successfully %s `nerd-icons' fonts to `%s'!" +- (nerd-icons-wicon "nf-weather-stars" :v-adjust 0.0) +- (if known-dest? "installed" "downloaded") +- font-dest)))) +- + ;;;###autoload + (defun nerd-icons-insert (&optional arg glyph-set) + "Interactive icon insertion function. +-- +2.41.0 +