From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Pykhalov Subject: Re: Which Emacs version used to build Emacs packages with emacs-checkout? Date: Fri, 22 Sep 2017 16:49:19 +0300 Message-ID: <87vakaetcw.fsf@gmail.com> References: <877exa5oph.fsf@gmail.com> <87h8wdc4p4.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50912) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvOKf-0002OG-3T for help-guix@gnu.org; Fri, 22 Sep 2017 09:49:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dvOKc-00032B-0v for help-guix@gnu.org; Fri, 22 Sep 2017 09:49:29 -0400 Received: from mail-lf0-x229.google.com ([2a00:1450:4010:c07::229]:48563) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dvOKb-00031Q-LP for help-guix@gnu.org; Fri, 22 Sep 2017 09:49:25 -0400 Received: by mail-lf0-x229.google.com with SMTP id q132so1209847lfe.5 for ; Fri, 22 Sep 2017 06:49:24 -0700 (PDT) In-Reply-To: <87h8wdc4p4.fsf@gmail.com> (Alex Kost's message of "Fri, 08 Sep 2017 23:31:51 +0300") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Alex Kost Cc: help-guix@gnu.org Hello Alex, Alex Kost writes: > Oleg Pykhalov (2017-09-07 21:49 +0300) wrote: > >> Hello Guix, >> >> Here is a =3Demacs-checkout=3D snippet which works for me. Enjoy it if >> somebody need it. >> >> I'm little bit confused about Emacs **version** that is used inside >> =3Demacs-build-systems=3D and inputs which use =3Demacs-minimal=3D. >> >> If I define a new package with =3D-checkout=3D suffix and install it, for >> example =3Dguix package -i emacs@26.0.50-1.f0eb70d=3D it works fine. >> >> As I notice all packages which uses =3Demacs-build-system=3D will use >> original Guix Emacs version package. Am I right? > > Right, by default 'emacs-build-system' uses the current 'emacs-minimal' > package. OK, I made a new emacs-minimal-checkout package based on emacs-checkout. --8<---------------cut here---------------start------------->8--- (define-public emacs-minimal-checkout ;; This is the version that you should use as an input to packages that j= ust ;; need to byte-compile .el files. (package (inherit emacs-checkout) (name "emacs-minimal") (synopsis "The extensible text editor (used only for byte-compilation)") (build-system gnu-build-system) (arguments (substitute-keyword-arguments (package-arguments emacs) ((#:phases phases) `(modify-phases ,phases (delete 'install-site-start))))) (inputs `(("ncurses" ,ncurses))) (native-inputs `(("pkg-config" ,pkg-config))))) --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- (define-public emacs-checkout (let ((commit "6d6dc246f93486fc8370399b6e1af8a17f371e4f") (revision "1")) (package (inherit emacs) (name "emacs") (version (string-append (package-version emacs) "-" revision "." (string-take commit 7))) (source (origin (method git-fetch) (uri (git-reference ;; "git://git.savannah.gnu.org/emacs.git" (url "git://localhost/~natsu/src/emacs") (commit commit))) (file-name (string-append name "-" version "-checkout")) (patches (search-patches "emacs-exec-path.patch" "emacs-source-date-epoch.patch")) (modules '((guix build utils))) (snippet ;; Delete the bundled byte-compiled elisp files and ;; generated autoloads. '(with-directory-excursion "lisp" (for-each delete-file (append (find-files "." "\\.elc$") (find-files "." "loaddefs\\.el$"))) ;; Make sure Tramp looks for binaries in the right places on ;; remote GuixSD machines, where 'getconf PATH' returns ;; something bogus. (substitute* "net/tramp-sh.el" ;; Patch the line after "(defcustom tramp-remote-path". (("\\(tramp-default-remote-path") (format #f "(tramp-default-remote-path ~s ~s ~s ~s " "~/.guix-profile/bin" "~/.guix-profile/sbin" "/run/current-system/profile/bin" "/run/current-system/profile/sbin"))))) (sha256 (base32 "17x0jpyg6wrdh5wn9yf1135gkdcprbcx1hj2wiwla57dh7rihils")))) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) ("bash" ,bash-minimal) ("perl" ,perl) ("rc" ,rc) ("python" ,python-2.7) ("chez-scheme" ,chez-scheme) ,@(package-native-inputs emacs))) (arguments (substitute-keyword-arguments `(#:parallel-build? #t #:tests? #f ,@(package-arguments emacs)) ((#:phases phases) `(modify-phases ,phases (add-after 'unpack 'autogen (lambda _ (zero? (system* "sh" "autogen.sh")))) (delete 'reset-gzip-timestamps)))))))) --8<---------------cut here---------------end--------------->8--- >> Then, all Emacs packages will be build by =3Demacs-minimal=3D which is >> original Guix Emacs version. > > Yes. Note that this default emacs can be overrided on a package level > by using #:emacs keyword in the arguments. See 'emacs-auctex' package > for example. Ah, this is bad for me. Now I need to redefine all those =E2=80=9C#:emacs ,emacs=E2=80=9D to =E2=80=9C#:emacs ,emacs-checkout=E2=80=9D as I guess. O= r I need to redefine =E2=80=9Cemacs=E2=80=9D variable instead of inherit it in =E2=80=9Cemacs-ch= eckout=E2=80=9D. >> I found =3D(setq load-prefer-newer t)=3D way to avoid loading old compil= ed >> elisp files, but it's not what I really want. > > This (I mean 'load-prefer-newer') is one of my favourite setting :-) > But it is not clear for me, what do you really want? > >> Thoughts? :-) > > Sorry, but I don't understand what you are asking about :-) I want to have Emacs builded from my local Git repository. And I also want Emacs packages builded with this my Emacs version.