~yoctocell/guix-yoctocell

42a8ceacdce6b1c4ff28144f6469b62e95d446e4 — Xinglu Chen 10 months ago 9452849
Cleanup.
5 files changed, 1 insertions(+), 367 deletions(-)

M Makefile.am
M yoctocell/gnu/packages/emacs.scm
D yoctocell/gnu/packages/mail.scm
M yoctocell/gnu/packages/version-control.scm
M yoctocell/guix/build/chicken-build-system.scm
M Makefile.am => Makefile.am +0 -1
@@ 29,7 29,6 @@ SOURCES =	\
  yoctocell/gnu/packages/gerbil.scm	\
  yoctocell/gnu/packages/haskell.scm	\
  yoctocell/gnu/packages/idris.scm	\
  yoctocell/gnu/packages/mail.scm	\
  yoctocell/gnu/packages/ocaml.scm	\
  yoctocell/gnu/packages/purescript.scm	\
  yoctocell/gnu/packages/tex.scm	\

M yoctocell/gnu/packages/emacs.scm => yoctocell/gnu/packages/emacs.scm +0 -278
@@ 61,33 61,6 @@
                 (base32
                  "0qylhjk6hqdsvfl4wz2zippm6h79g6812agpy1s5pk6p51pwhmnd")))))))

;; Add support for SASL EXTERNAL
(define-public emacs-circe-next
  (let ((commit "2798a75d625677402b01f138ebac6eb53337d9d6")
        (revision "0"))
    (package
      (inherit emacs-circe)
      (name "emacs-circe-next")
      (version (git-version (package-version emacs-circe) revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/jorgenschaefer/circe")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "0r7k7cxs6gfam1rdy04vdq3q796v32wv5q9gq67sxfji8x1vbkn7"))))
      (arguments
       `(,@(substitute-keyword-arguments (package-arguments emacs-circe)
             ;; Tests fail
             ;;
             ;; Symbol’s value as variable is void: gnutls-log-level
             ;; command "buttercup" "-L" "." failed with status 255
             ;;
             ;; but I can't find `gnutls-log-level' anywhere ?
             ((#:tests? _ #f) #f)))))))

(define-public emacs-geiser-chicken
  (package
    (name "emacs-geiser-chicken")


@@ 169,18 142,6 @@ readers, Git interfaces, and even web browsers---piem is mostly about
bridging some of these parts for convenience.")
    (license license:gpl3+)))

(define-public emacs-piem-dev
  (let* ((source-dir (string-append (getenv "HOME") "/src/piem"))
         (commit (git-output source-dir "rev-parse" "HEAD")))
    (package
      (inherit emacs-piem)
      (name "emacs-piem-dev")
      (version (git-version "2.0" "HEAD" commit))
      (source
       (local-file source-dir
                   #:recursive? #t
                   #:select? (git-predicate source-dir))))))

(define-public emacs-idris-mode-next
  ;; Latest tag doesn't include support for Idris2; commit from
  ;; 2021-08-03.


@@ 2146,242 2107,3 @@ steps if you ever need a reminder of where you’ve been.  Each mode
keeps a log local to some scope.")
    (license license:gpl3+))))




;;;
;;; Protesilaos' Emacs packages.
;;;

(define %prot-emacs-commit
  "a2df2859a98e1ddf57aceec2887bf559149867c3")

(define %prot-emacs-source-dir
  (string-append (getenv "HOME") "/src/prot-dotfiles"))

(define %prot-emacs-base-url
  (format
   #f
   "https://gitlab.com/protesilaos/dotfiles/-/raw/~a/emacs/.emacs.d/prot-lisp"
   %prot-emacs-commit))

(define (git-output dir . args)
  "Execute 'git ARGS ...' in DIR command and return its output without
trailing newspace."
  (with-directory-excursion dir
    (let* ((port   (apply open-pipe* OPEN_READ "git" args))
           (output (read-string port)))
      (close-port port)
      (string-trim-right output #\newline))))

(define (current-commit source-dir)
  (git-output source-dir "rev-parse" "HEAD"))

(define* (make-prot-emacs-package fname hash #:key (inputs '()) (local? #f))
  "Construct a package definition for one of Protesilaos' Emacs libraries.
FNAME is the name of the Emacs library, HASH is the base-32 sha-256
hash of the file, and INPUTS is an association list of propagated
inputs.  If LOCAL? is @code{#t}, read the file from a local checkout
found in @var{%prot-emacs-source-dir}"
  (let* ((revision "0")
         (commit (if local?
                     (current-commit %prot-emacs-source-dir)
                     %prot-emacs-commit)))
    (package
      (name fname)
      (version (git-version "0.0.0" revision commit))
      (source (if local?
                  (local-file (string-append %prot-emacs-source-dir
                                             "/emacs/.emacs.d/prot-lisp/"
                                             fname ".el"))
                  (origin
                    (method url-fetch)
                    (uri (string-append
                          %prot-emacs-base-url "/" fname ".el"))
                    (file-name (string-append
                                fname "-" version ".el"))
                    (sha256
                     (base32 hash)))))
      (build-system emacs-build-system)
      (propagated-inputs inputs)
      (synopsis "")
      (description "")
      (home-page "https://gitlab.com/protesilaos/dotfiles")
      (license license:gpl3+))))

(define emacs-prot-common
  (make-prot-emacs-package
   "prot-common"
   "018kz4jxaadz24nh17ma8hiw5hwpljzdzgldcfya3ckl3l2bpp50"))

(define emacs-prot-pulse
  (make-prot-emacs-package
   "prot-pulse"
   "0ca3mm7w9pfasqfi357in8vzwnx240rny8vabamb5l40jqxbc0ih"))

(define-public emacs-prot-orderless
  (make-prot-emacs-package
   "prot-orderless"
   "1xr5b4vsprky9k8g8zdqrsxlni2my9y0halwmbp23s79wc694pv4"
   #:inputs `(("emacs-orderless" ,emacs-orderless))))

(define-public emacs-prot-vc
  (make-prot-emacs-package
   "prot-vc"
   "15zg5yisyw3ydndcvjdxsz1nny5gpkk1k315j3rmapiafkjx8bj4"
   #:inputs `(("emacs-prot-common" ,emacs-prot-common))))

(define-public emacs-prot-project
  (make-prot-emacs-package
   "prot-project"
   "139s7plld8xj3lv7sg3ln0l8l7bmja7jak0qnm6mp3v40y3m6xcr"
   #:inputs `(("emacs-prot-common" ,emacs-prot-common)
              ("emacs-project" ,emacs-project)
              ("emacs-magit" ,emacs-magit))))

(define-public emacs-prot-eww
  (make-prot-emacs-package
   "prot-eww"
   "1wasbr5yqlk2h5x7bvaca4bidwyig9vfipg8d2k18vlzp6mm6jyq"
   #:inputs `(("emacs-prot-common" ,emacs-prot-common)
              ("emacs-prot-pulse" ,emacs-prot-pulse))))

(define-public emacs-prot-dired
  (make-prot-emacs-package
   "prot-dired"
   "1sxq3dlnn2qjgy2kxcl26j17dy6s5m4arsv133fy3llmns34w37k"
   #:inputs
   `(("emacs-prot-common" ,emacs-prot-common))))

(define-public emacs-prot-elfeed
  (make-prot-emacs-package
   "prot-elfeed"
   "17d6lvz1jdmqrzl8vy4j7ixbiicbdfqqygzi6phgvd29wz3f8b7m"
   #:inputs
   `(("emacs-prot-common" ,emacs-prot-common)
     ("emacs-elfeed" ,emacs-elfeed))))

(define-public emacs-prot-minibuffer
  (make-prot-emacs-package
   "prot-minibuffer"
   "0lrf2nndjw04vj9z581kwa8824qh24d5fkpp04mw0ycfi8sln2lr"
   #:inputs
   `(("emacs-prot-common" ,emacs-prot-common))))

(define-public emacs-prot-embark
  (make-prot-emacs-package
   "prot-embark"
   "iwasbr5yqlk2h5x7bvaca4bidwyig9vfipg8d2k18vlzp6mm6jyq"
   #:inputs
   `(("emacs-prot-common" ,emacs-prot-common)
     ("emacs-prot-minibuffer" ,emacs-prot-minibuffer)
     ("emacs-embark" ,emacs-embark))))

(define-public emacs-prot-fill
  (make-prot-emacs-package
   "prot-fill"
   "0kyqrpmmnhkhq9qpz4zlw31kgcf16sn8wa7160lzkkqm2s5l4ipy"))

(define-public emacs-prot-ibuffer
  (make-prot-emacs-package
   "prot-ibuffer"
   "0ch8gyjb91ljdj3rfq9lhpj8ymh5y7m2b37rddmprkaaa5nj5kl7"))

(define-public emacs-prot-outline
  (make-prot-emacs-package
   "prot-outline"
   "0vfbzjswq0c5xjn790fm8qjk64gphjllq8fj1qmnmb0syi7jbyl0"
   #:inputs
   `(("emacs-prot-common" ,emacs-prot-common))))

(define-public emacs-prot-search
  (make-prot-emacs-package
   "prot-search"
   "0y8gaklpprrj8n856y66xkp42mnil75lrrsp070nmzfhgh0wyjad"
   #:inputs
   `(("emacs-prot-common" ,emacs-prot-common))))

(define-public emacs-prot-simple
  (make-prot-emacs-package
   "prot-simple"
   "1fm569ghi4fzxvnfz7fwfwmlqsfv43dkd1m4ifr4lfxrysyh3xak"))

(define-public emacs-prot-text
  (make-prot-emacs-package
   "prot-text"
   "11hicgbrbldc6xghxn80gii0hxw7r7smsf0gbhqdr3na1d6xd314"
   #:inputs
   `(("emacs-prot-common" ,emacs-prot-common)
     ("emacs-prot-simple" ,emacs-prot-simple))))

(define-public emacs-prot-lisp
  ;; Commit from 2021-08-05.
  (let ((commit "3caa636b4b6ceebe439dd178c9c0842e7efd4952")
        (revision "0"))
    (package
      (name "emacs-prot-lisp")
      (version (git-version "0.1.0" revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://gitlab.com/protesilaos/dotfiles")
                      (commit commit)))
                (file-name (git-file-name name version))
                (modules '((guix build utils)))
                (snippet
                 ;; Delete non-Emacs stuff
                 `(begin
                    (for-each (lambda (file)
                                (delete-file-recursively file))
                              '("bin"
                                "fontconfig"
                                "mpv"
                                "notmuch"
                                "vim"
                                "colours"
                                "mbsync"
                                "NO-STOW-git"
                                "proselint"
                                "shell"
                                "xterm"))))
                (sha256
                 (base32
                  "0zrps8d0rll7nqlbx69a6jir4pvjn59di63q23v8glrrqxhnbk4z"))))
      (build-system emacs-build-system)
      (arguments
       `(#:phases
         (modify-phases %standard-phases
           (add-after 'unpack 'chdir
             (lambda _
               (chdir "emacs/.emacs.d/prot-lisp")))
           (add-after 'chdir 'remove-unwanted-elisp
             (lambda _
               (for-each (lambda (file)
                           (delete-file-recursively file))
                         '("modus-themes-exporter.el"
                           "prot-gnus-deprecated-conf.org"
                           "prot-icomplete-deprecated-conf.el"
                           "prot-ivy-deprecated-conf.el"
                           "prot-mu4e-deprecated-conf.el"
                           "tmr.el"
                           "usls.el"
                           "prot-bongo.el"
                           "prot-cursor.el"
                           "prot-moody.el"
                           "prot-elfeed-bongo.el"
                           "prot-sideline.el")))))))
      (propagated-inputs
       `(("notmuch" ,notmuch)
         ("emacs-consult" ,emacs-consult)
         ("emacs-embark" ,emacs-embark)
         ("emacs-elfeed" ,emacs-elfeed)
         ("emacs-orderless" ,emacs-orderless)
         ("emacs-magit" ,emacs-magit)
         ("emacs-project" ,emacs-project)))
      (home-page "https://protesilaos.com/dotemacs")
      (synopsis "Selection of Protesilaos' Emacs libraries")
      (description
       "This package provides a selection of Protesilaos' Emacs libraries
found in his @uref{https://protesilaos.com/dotemacs, ``dotemacs''}
page.")
      (license license:gpl3+))))

D yoctocell/gnu/packages/mail.scm => yoctocell/gnu/packages/mail.scm +0 -85
@@ 1,85 0,0 @@
(define-module (yoctocell gnu packages mail)
  #:use-module (gnu packages mail)
  #:use-module (gnu packages base)
  #:use-module (gnu packages commencement)
  #:use-module (gnu packages gcc)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages check)
  #:use-module (gnu packages texinfo)
  #:use-module (gnu packages groff)
  #:use-module (guix packages)
  #:use-module (guix profiles)
  #:use-module (guix git)
  #:use-module (guix git-download)
  #:use-module (guix build utils)
  #:use-module (guix utils)
  #:use-module (guix gexp)
  #:use-module (ice-9 popen)
  #:use-module (ice-9 rdelim))




(define (git-output dir . args)
  "Execute 'git ARGS ...' in DIR command and return its output without
trailing newspace."
  (with-directory-excursion dir
    (let* ((port   (apply open-pipe* OPEN_READ "git" args))
           (output (read-string port)))
      (close-port port)
      (string-trim-right output #\newline))))

(define-public public-inbox-dev
  (let* ((source-dir (string-append (getenv "HOME") "/src/public-inbox"))
         (commit (git-output source-dir "rev-parse" "HEAD"))
         (revision "0"))
    (package/inherit public-inbox
      (version (git-version "1.7.0" "HEAD" commit))
      (source (local-file source-dir
                          #:recursive? #t
                          #:select? (git-predicate source-dir)))
      (inputs
       `(("perl-inline-c" ,perl-inline-c)
         ("perl-parse-recdescent" ,perl-parse-recdescent)
         ,@(package-inputs public-inbox)))
      (propagated-inputs
       `(("make" ,gnu-make)
         ("gcc" ,gcc-toolchain)))
      (arguments
       `(,@(substitute-keyword-arguments (package-arguments public-inbox)
             ((#:tests? _ #f) #f)))))))

(define-public l2md-dev
  (let* ((source-dir (string-append (getenv "HOME") "/src/l2md"))
         (commit (git-output source-dir "rev-parse" "HEAD")))
    (package/inherit l2md
      (version (git-version "0.0.0" "HEAD" commit))
      (source (local-file source-dir
                          #:recursive? #t
                          #:select? (git-predicate source-dir))))))

;; Wrappers for Notmuch for using different databases, this is to
;; avoid scalability issues with big databases (~1 million or more messages)
;;
;; - notmuch 1 - Emacs related
;; - notmuch 2 - Version control related
;; - notmuch 3 - Kernel related
(define-public notmuch1
  (wrap-package
   notmuch
   "notmuch1"
   #~(begin
       (setenv "NOTMUCH_CONFIG" "/home/yoctocell/.config/notmuch/notmuch1rc")
       (apply system* (cons #$(file-append notmuch "/bin/notmuch")
                            (cdr (command-line)))))))

(define-public notmuch2
  (wrap-package
   notmuch
   "notmuch2"
   #~(begin
       (setenv "NOTMUCH_CONFIG" "/home/yoctocell/.config/notmuch/notmuch2rc")
       (apply system* (cons #$(file-append notmuch "/bin/notmuch")
                            (cdr (command-line)))))))

;; l2md-dev

M yoctocell/gnu/packages/version-control.scm => yoctocell/gnu/packages/version-control.scm +0 -1
@@ 789,4 789,3 @@ always remain possible to work with both Got and Git on the same
repository.")
      (license license:bsd-1))))

python-mercurial-keyring

M yoctocell/guix/build/chicken-build-system.scm => yoctocell/guix/build/chicken-build-system.scm +1 -2
@@ 69,8 69,7 @@ When SOURCE is a directory, copy its content into UNPACK-PATH instead of
unpacking."
  (define (unpack-maybe-strip source dest)
    (let* ((scratch-dir (string-append (or (getenv "TMPDIR") "/tmp")
                                       "/scratch-dir"))
           (out (mkdir-p scratch-dir)))
                                       "/scratch-dir")))
      (with-directory-excursion scratch-dir
        (if (string-suffix? ".zip" source)
            (invoke "unzip" source)