guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-snapshot and emacs-xwidget example


From: Feng Shu
Subject: emacs-snapshot and emacs-xwidget example
Date: Mon, 25 May 2015 17:18:59 +0800 (CST)

I have hacked emacs-snapshot and emacs-xwidget package define.
for very very slooooooooowly newwork speed, I can't build them as official guix
package.  people interesting them can copy and *edit*....

#+BEGIN_SRC lisp
(define-public emacs-snapshot
  (package (inherit emacs)
           (name "emacs-snapshot")
           (version "20150522.9e41e0b")
           (source (origin
                    (method git-fetch)
                    (uri (git-reference
                          (url "/home/feng/project/emacs")
                          (commit "9e41e0bc6a6fdb7a01841db62d8de42d67be534a")))
                    (sha256
                     (base32
                      "1p50nrmwnx1d6an7daz8fxkj6ylxml7g23b996ba837nlfz3l8ay"))))
           (native-inputs
            `(("autoconf" ,autoconf)
              ("automake" ,automake)
              ,@(package-native-inputs emacs)))
           (arguments
            (substitute-keyword-arguments
             `(;; Build fails if we allow parallel build.
               #:parallel-build? #f
                                 ;; Tests aren't passing for now.
                                 #:tests? #f
                                 ,@(package-arguments emacs))
             ((#:phases phases)
              `(modify-phases ,phases
                              (add-after 'unpack 'autogen
                                         (lambda _
                                           (zero? (system* "sh" 
"autogen.sh"))))))))))

(define-public webkitgtk3.0
  ;; Latest release of the stable 2.4 series.
  (package (inherit webkitgtk)
    (name "webkitgtk3.0")
    (version "2.4.8")
    (source (origin
              (method url-fetch)
              (uri (string-append "http://www.webkitgtk.org/releases/";
                                  "webkitgtk" "-" version ".tar.xz"))
              (sha256
               (base32
                "08xxqsxpa63nzgbsz63vrdxdxgpysyiy7jdcjb57k1hprdcibwb8"))
              (patches (list (search-patch 
"webkitgtk-2.4.8-gmutexlocker.patch")))))
    (build-system gnu-build-system)
    (arguments
     '(#:tests? #f ; no tests
       #:phases (modify-phases %standard-phases
                  (add-after
                   'unpack 'set-gcc
                   (lambda _ (setenv "CC" "gcc") #t)))
       #:configure-flags '("--enable-webkit2=no"
                           "--with-gtk=3.0")))
    (inputs
     `(("flex" ,flex)
       ("which" ,which)
       ,@(package-inputs webkitgtk)))))

(define-public emacs-xwidget
  (package (inherit emacs-snapshot)
           (name "emacs-xwidget")
           (version "20150522.e6f6513")
           (source (origin
                    (method git-fetch)
                    (uri (git-reference
                          (url "/home/feng/project/emacs")
                          (commit "e6f6513fc9a1beae5a48de93fb23372eada7dd85")))
                    (sha256
                     (base32
                      "0ayzvw4ixvys79b8x4xlazp72f5x2wj4zdqfazb8klkn5mv7cqlj"))))
           (inputs
            `(("libXcomposite" ,libxcomposite)
              ("libsoup" ,libsoup)
              ("webkitgtk3.0" ,webkitgtk3.0)
              ,@(package-inputs emacs-snapshot)))
           (arguments
            (append '(#:configure-flags
                      (let ((webkitgit-dir (assoc-ref %build-inputs 
"webkitgtk3.0"))
                            (libsoup-dir (assoc-ref %build-inputs "libsoup")))
                        (list "--with-xwidgets"
                              "--with-x-toolkit=gtk3"
                              (string-append "CPPFLAGS="
                                             "-I" webkitgit-dir 
"/include/webkitgtk-3.0 "
                                             "-I" libsoup-dir  
"/include/libsoup-2.4 ")
                              (string-append "LDFLAGS="
                                             "-L" webkitgit-dir "/lib 
-lwebkitgtk-3.0 "
                                             "-L" libsoup-dir  "/lib -lsoup-2.4 
"
                                             "-Wl,-rpath=" webkitgit-dir "/lib "
                                             "-Wl,-rpath=" libsoup-dir  "/lib ")
                              (string-append "LIBS="
                                             "-L" webkitgit-dir "/lib 
-lwebkitgtk-3.0 "
                                             "-L" libsoup-dir  "/lib -lsoup-2.4 
"))))
                    (package-arguments emacs-snapshot)))))

#+END_SRC


-- 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]