(use-modules (guix) (gnu) (srfi srfi-1) (guix packages) (guix download)) (let ((emacs (car (find-packages-by-name "emacs"))) (gtk+ (car (find-packages-by-name "gtk+")))) (package (inherit emacs) (name "emacs-gtk3") (version "24.3") (source (origin (method url-fetch) (uri "mirror://gnu/emacs/emacs-24.3.tar.xz") (sha256 (base32 "1385qzs3bsa52s5rcncbrkxlydkw0ajzrvfxgv8rws5fx512kakh")) (patches (list "/home/beffa/src/guix/git/guix/gnu/packages/patches/emacs-configure-sh.patch")))) (arguments '(#:configure-flags (list (string-append "--with-crt-dir=" (assoc-ref %build-inputs "libc") "/lib") "--with-x=yes" "--with-x-toolkit=gtk3") #:phases (alist-cons-before 'configure 'fix-/bin/pwd (lambda _ ;; Use `pwd', not `/bin/pwd'. (substitute* (find-files "." "^Makefile\\.in$") (("/bin/pwd") "pwd"))) %standard-phases))) (inputs (alist-cons "gtk+" (list gtk+) (alist-delete "gtk+" (package-inputs emacs))))))