patches for running on my machine
Timmy Douglas
mail at timmydouglas.com
Sat Jan 4 13:07:41 EST 2025
I created two PRs on codeberg that enable me to run it on my guix
machine:
https://codeberg.org/guile-emacs/guile-emacs/pulls/6
https://codeberg.org/guile-emacs/guile-emacs/pulls/7
I don't run an x server so the pgtk version lets me run it natively
under the sway compositor.
along with that, I'm using this my-guile-emacs.scm that I slightly
modified from what Robin gave me (--with-pgtk):
;; To build & run Guile-Emacs after downloading (replace
;; ~/guix/my-guile-emacs.scm as needed):
;; # Choose your revision: older is stabler, this is what I used for emacsconf
;; git checkout r119-a2c33430-20130106-26.0.50-TSHEDO
;; # "-D" because we will build Guile-Emacs directly
;; guix shell --pure -Df ~/guix/my-guile-emacs.scm
;; autoreconf -vif && \
;; ./configure --without-modules --without-threads --without-json --without-native-compilation --with-x-toolkit=no --with-pgtk --without-tree-sitter CFLAGS="-Og -ggdb3" && make -j8
;; EMACSLOADPATH=$PWD/lisp ./src/temacs -Q
(use-modules (guix) (gnu) (guix git-download))
(use-package-modules guile emacs autotools flex texinfo gettext bdw-gc
;; Debugging tools: gdb, rr, bear
gdb debug build-tools version-control)
;; REVISION must be incremented for updates to take effect
(define-public my-guile-for-guile-emacs
(let ((commit "ece0f4e7823f055a0a08a8b83e1ec4f078877723")
(revision "11"))
(package
(inherit guile-next)
(name "my-guile-for-guile-emacs")
(version (git-version "3.0.0" revision commit))
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://git.savannah.gnu.org/git/guile.git")
(commit commit)))
(file-name (git-file-name name version))
(sha256
(base32
"0gvarij14ky1yan25pxx4k6hsbwqmnpl3cs129ygh31mlgds47zb"))))
(outputs '("out" "debug"))
(arguments
(substitute-keyword-arguments (package-arguments guile-next)
((#:strip-binaries? _ #~'())
#~#f)
((#:configure-flags flags #~'())
#~(list "--disable-jit"
"CFLAGS=-Og -ggdb3"
"--enable-mini-gmp"
"--disable-static"))
((#:phases phases)
#~(modify-phases #$phases
(replace 'bootstrap
(lambda _
;; Disable broken tests.
;; TODO: Fix them!
(substitute* "test-suite/tests/gc.test"
(("\\(pass-if \"after-gc-hook gets called\"" m)
(string-append "#;" m)))
(substitute* "test-suite/tests/version.test"
(("\\(pass-if \"version reporting works\"" m)
(string-append "#;" m)))
;; Warning: Unwind-only `out-of-memory' exception; skipping pre-unwind handler.
;; FAIL: test-out-of-memory
(substitute* "test-suite/standalone/Makefile.am"
(("(check_SCRIPTS|TESTS) \\+= test-out-of-memory") ""))
(patch-shebang "build-aux/git-version-gen")
(invoke "sh" "autogen.sh")
#t))
(delete 'check)))))
(native-inputs
(modify-inputs (package-native-inputs guile-next)
(prepend autoconf
automake
libtool
flex
texinfo
gettext-minimal))))))
(define-public my-guile-emacs
(let ((commit "bbd8214f73b4253fefdd933a4e91ec0ad7a71f70")
(revision "9"))
(package
(inherit emacs)
(name "guile-emacs")
(version "30.0.50-0")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://codeberg.org/lyrra/guilemacs.git")
(commit commit)))
(file-name (git-file-name name version))
(sha256
(base32
"09kk42zj8qmx9d9rdxy42hah5kyi4sk22ng746phf0fijic3r9p7"))))
(native-inputs
(modify-inputs
(package-native-inputs emacs)
(prepend autoconf
automake
my-guile-for-guile-emacs
;; Debugging tools
gdb
rr
bear
git
(list my-guile-for-guile-emacs "debug"))))
(arguments
(substitute-keyword-arguments
;; Build fails if we allow parallel build.
;; Tests may not pass.
`(#:parallel-build? #t
#:tests? #f
#:strip-binaries? #f
,@(package-arguments emacs))
((#:make-flags flags #~'())
#~(list "V=1"))
((#:configure-flags flags #~'())
#~(list "--without-modules"
"--without-threads"
"--with-jpeg=no"
"--without-native-compilation"
"--without-json"
"--with-x-toolkit"
"--without-tree-sitter"
"CFLAGS=-Og -ggdb3"))
((#:phases phases)
#~(modify-phases #$phases
(delete 'patch-compilation-driver)
(delete 'set-libgccjit-path)
(delete 'validate-comp-integrity)
;;(delete 'patch-program-file-names)
(add-after 'unpack 'autogen
(lambda _
(invoke "autoregen" "-vif")))
;; (add-before 'build 'ja-dic-cnv-lexbind
;; (lambda _
;; (substitute* "lisp/international/ja-dic-cnv.el"
;; (("to Emacs Lisp")
;; "to Emacs Lisp -*- lexical-binding: t -*-"))
;; #t))
;; Build sometimes fails: deps/dispnew.d: No such file or directory
;; (add-before 'configure 'setenv
;; (lambda _
;; (setenv "CFLAGS" "-O0 -g")))
(add-before 'build 'touch-finder-inf
(lambda _
(invoke "touch" "lisp/finder-inf.el")))
(add-before 'build 'make-deps-dir
(lambda _
(invoke "mkdir" "-p" "src/deps")))
(replace "build"
(lambda _
(system* "make" "-j8")
#t))
(delete 'restore-emacs-pdmp)
(delete 'strip-double-wrap)
(delete 'build-trampolines)
(delete 'install-site-start))))))))
my-guile-emacs
More information about the Guile-Emacs-Devel
mailing list