From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56650) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f8z0U-0007cU-Rz for guix-patches@gnu.org; Wed, 18 Apr 2018 22:09:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f8z0Q-0005i0-0Y for guix-patches@gnu.org; Wed, 18 Apr 2018 22:09:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:52025) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f8z0P-0005hm-SI for guix-patches@gnu.org; Wed, 18 Apr 2018 22:09:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f8z0P-0008I3-JX for guix-patches@gnu.org; Wed, 18 Apr 2018 22:09:01 -0400 Subject: [bug#30884] Status: [PATCH 0/6] gnu: Add emacs-epkg. Resent-Message-ID: From: Maxim Cournoyer References: <20180320162956.11860-1-go.wigust@gmail.com> <87tvsdk77s.fsf@gmail.com> <877ep4ngst.fsf@gmail.com> Date: Wed, 18 Apr 2018 22:07:56 -0400 In-Reply-To: <877ep4ngst.fsf@gmail.com> (Maxim Cournoyer's message of "Wed, 18 Apr 2018 21:09:06 -0400") Message-ID: <87po2wlzib.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Oleg Pykhalov Cc: bug#30884 <30884@debbugs.gnu.org> Hello again, Maxim Cournoyer writes: > Hi Oleg, > > Oleg Pykhalov writes: > >> Hello Ludovic, >> >> Thank you for review! >> >> I've applied all your suggestions except =E2=80=98set-emacs-load-path=E2= =80=99. First >> of all this procedure is not exported. > > Phases are typically not exported individually, but as an alist of all > the phases of the build system, as `%standard-phases'. [...] > As `set-emacs-load-path' is a phase itself, it expects to be called as > such, with keyworded arguments. It would be simpler to just insert the > phase as in: > ;; Add this to the define-module top level definition: > ;; (define-module (gnu packages emacs) > ;; ... > ;; #:use-module ((guix build emacs-build-system) #:prefix emacs:) > ;; ... Actually, you don't want to import this at the top-level of the emacs.scm module but rather specify the import using the #:modules argument passed to the build system. Here's a complete example (not yet merged in master, currently under review): --8<---------------cut here---------------start------------->8--- (define-public emacs-pdf-tools (package (name "emacs-pdf-tools") (version "0.80") (source (origin (method url-fetch) (uri (string-append "https://github.com/politza/pdf-tools/archive/v" version ".tar.gz")) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "06imydn3a92vr57azpn1zhqc14kxyyslmyi9ldsyphan9b724gb6")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; there are no tests #:modules ((guix build gnu-build-system) ((guix build emacs-build-system) #:prefix emacs:) (guix build utils) (guix build emacs-utils)) #:imported-modules (,@%gnu-build-system-modules (guix build emacs-build-system) (guix build emacs-utils)) #:phases (modify-phases %standard-phases ;; Build server side using 'gnu-build-system'. (add-after 'unpack 'enter-server-dir (lambda _ (chdir "server") #t)) (add-after 'enter-server-dir 'autogen (lambda _ (zero? (system* "bash" "autogen.sh")))) ;; Build emacs side using 'emacs-build-system'. (add-after 'compress-documentation 'enter-lisp-dir (lambda _ (chdir "../lisp") #t)) (add-after 'enter-lisp-dir 'emacs-patch-variables (lambda* (#:key outputs #:allow-other-keys) ;; Set path to epdfinfo program. (emacs-substitute-variables "pdf-info.el" ("pdf-info-epdfinfo-program" (string-append (assoc-ref outputs "out") "/bin/epdfinfo"))) ;; Set 'pdf-tools-handle-upgrades' to nil to avoid "auto ;; upgrading" that pdf-tools tries to perform. (emacs-substitute-variables "pdf-tools.el" ("pdf-tools-handle-upgrades" '())))) (add-after 'emacs-patch-variables 'set-emacs-load-path (assoc-ref emacs:%standard-phases 'set-emacs-load-path)) (add-after 'set-emacs-load-path 'emacs-install (assoc-ref emacs:%standard-phases 'install)) (add-after 'emacs-install 'emacs-build (assoc-ref emacs:%standard-phases 'build)) (add-after 'emacs-install 'emacs-make-autoloads (assoc-ref emacs:%standard-phases 'make-autoloads))))) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) ("pkg-config" ,pkg-config) ("emacs" ,emacs-minimal))) (inputs `(("poppler" ,poppler) ("cairo" ,cairo) ("glib" ,glib) ("libpng" ,libpng) ("zlib" ,zlib))) (propagated-inputs `(("tablist" ,emacs-tablist))) (synopsis "Emacs support library for PDF files") (description "PDF Tools is, among other things, a replacement of DocView for PDF files. The key difference is that pages are not pre-rendered by e.g. ghostscript and stored in the file-system, but rather created on-demand and stored in memory.") (home-page "https://github.com/politza/pdf-tools") (license license:gpl3+))) --8<---------------cut here---------------end--------------->8--- HTH, Maxim