From 453e34c3816a9e7a157fd76c1d7949fc62e8019c Mon Sep 17 00:00:00 2001 From: Burgess Chang Date: Thu, 12 Sep 2024 09:40:16 +0800 Subject: [PATCH] feat: add patched pangu-spacing Create a patched version of pangu-spacing to prevent some annoying byte compile errors. See coldnew/pangu-spacing#45 for details. Signed-off-by: Burgess Chang --- .../my-emacs/extra-emacs-packages.nix | 5 ++- .../my-emacs/manual-packages/default.nix | 2 ++ .../manual-packages/pangu-spacing/default.nix | 33 +++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 nix/my-emacs/overlays/my-emacs/manual-packages/pangu-spacing/default.nix diff --git a/nix/my-emacs/overlays/my-emacs/extra-emacs-packages.nix b/nix/my-emacs/overlays/my-emacs/extra-emacs-packages.nix index 521d130..b94cc25 100644 --- a/nix/my-emacs/overlays/my-emacs/extra-emacs-packages.nix +++ b/nix/my-emacs/overlays/my-emacs/extra-emacs-packages.nix @@ -42,6 +42,7 @@ with epkgs; eglot-booster form-feed on + pangu-spacing sideline-eldoc ]) ++ (with melpaPackages; [ @@ -91,7 +92,9 @@ with epkgs; org-side-tree ox-reveal ox-tufte - pangu-spacing + # REVIEW Use melpa's pangu-spacing once coldnew/pangu-spacing#45 has been + # resolved. + # pangu-spacing parsebib pdf-tools rainbow-delimiters diff --git a/nix/my-emacs/overlays/my-emacs/manual-packages/default.nix b/nix/my-emacs/overlays/my-emacs/manual-packages/default.nix index d3a8ca7..bcce969 100644 --- a/nix/my-emacs/overlays/my-emacs/manual-packages/default.nix +++ b/nix/my-emacs/overlays/my-emacs/manual-packages/default.nix @@ -14,5 +14,7 @@ in on = callPackage' ./on; + pangu-spacing = callPackage' ./pangu-spacing; + sideline-eldoc = callPackage' ./sideline-eldoc; } diff --git a/nix/my-emacs/overlays/my-emacs/manual-packages/pangu-spacing/default.nix b/nix/my-emacs/overlays/my-emacs/manual-packages/pangu-spacing/default.nix new file mode 100644 index 0000000..7745f94 --- /dev/null +++ b/nix/my-emacs/overlays/my-emacs/manual-packages/pangu-spacing/default.nix @@ -0,0 +1,33 @@ +{ + emacs, + fetchFromGitHub, + lib, + epkgs, + ... +}: +let + inherit (epkgs) trivialBuild; + + version = "0.4-2024-09-12"; + + src = fetchFromGitHub { + hash = "sha256-lu23V6GJDhM3ChMo+QGH81fh8JjZFTrf/4LkQxwdeac="; + owner = "nailuoGG"; + repo = "pangu-spacing"; + rev = "000aa101c1d13db6bb6c04b8962d3c98a8e7b45c"; + }; + + meta = { + inherit (emacs.meta) platforms; + + description = "Emacs minor-mode to add space between CJK and English characters"; + homepage = "https://github.com/nailuoGG/pangu-spacing"; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ brsvh ]; + }; +in +trivialBuild { + inherit meta src version; + + pname = "pangu-spacing"; +}