[Top][All Lists]

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

Re: Improve ASDF build system for Common Lisp libraries

From: Pierre Neidhardt
Subject: Re: Improve ASDF build system for Common Lisp libraries
Date: Wed, 23 Sep 2020 13:15:10 +0200

I've retested wip-lisp on 851abcf6c9c15d90cb77caaaa57b40d10c3b4835,
everything seems to work!

Nit: Maybe enable tests in ecl-numcl ?

I've successfully tested Nyxt with the following recipe:

--8<---------------cut here---------------start------------->8---
(define-public nyxt
    (name "nyxt")
    ;; Package the pre-release because latest stable 1.5.0 does not build
    ;; anymore.
    (version "2-pre-release-1")
       (method git-fetch)
       (uri (git-reference
             ;; TODO: Mirror seems to hang, let's fallback to GitHub for now.
             ;; (url "";)
             (url "";)
             (commit version)))
       (file-name (git-file-name "nyxt" version))))
    (build-system gnu-build-system)
     `(#:make-flags (list "nyxt" "NYXT_INTERNAL_QUICKLISP=false"
                          (string-append "DESTDIR=" (assoc-ref %outputs "out"))
       #:strip-binaries? #f             ; Stripping breaks SBCL binaries.
       (modify-phases %standard-phases
         (add-after 'unpack 'patch-version ; Version is guessed from .git which 
Guix does not have.
           (lambda* (#:key inputs #:allow-other-keys)
             (let ((version (format #f "~a" ,version))
                   (file "source/global.lisp"))
               (chmod file #o666)
               (let ((port (open-file file "a")))
                 (format port "(setf +version+ ~s)" version)
                 (close-port port)))
         (add-before 'build 'make-desktop-version-number
           (lambda _
             (with-output-to-file "version"
               (lambda _
                 (format #t "~a" ,version)

         (delete 'configure)
         (add-before 'build 'fix-common-lisp-cache-folder
           (lambda _
             (setenv "HOME" "/tmp")
         (add-after 'install 'wrap-program
           (lambda* (#:key inputs outputs #:allow-other-keys)
             (let* ((bin (string-append (assoc-ref outputs "out") "/bin/nyxt"))
                    (glib-networking (assoc-ref inputs "glib-networking"))
                    (libs '("gsettings-desktop-schemas"))
                    (path (string-join
                           (map (lambda (lib)
                                  (string-append (assoc-ref inputs lib) "/lib"))
                    (gi-path (string-join
                              (map (lambda (lib)
                                     (string-append (assoc-ref inputs lib) 
                    (xdg-path (string-join
                               (map (lambda (lib)
                                      (string-append (assoc-ref inputs lib) 
               (wrap-program bin
                 `("GIO_EXTRA_MODULES" prefix
                   (,(string-append glib-networking "/lib/gio/modules")))
                 `("GI_TYPELIB_PATH" prefix (,gi-path))
                 `("LD_LIBRARY_PATH" ":" prefix (,path))
                 `("XDG_DATA_DIRS" ":" prefix (,xdg-path)))
     `(("prove" ,sbcl-prove)
       ("sbcl" ,sbcl)))
     `(("alexandria" ,sbcl-alexandria)
       ("bordeaux-threads" ,sbcl-bordeaux-threads)
       ("sbcl-containers" ,sbcl-cl-containers)
       ("sbcl-css" ,sbcl-cl-css)
       ("sbcl-json" ,sbcl-cl-json)
       ("sbcl-markup" ,sbcl-cl-markup)
       ("sbcl-ppcre" ,sbcl-cl-ppcre)
       ("sbcl-prevalence" ,sbcl-cl-prevalence)
       ("closer-mop" ,sbcl-closer-mop)
       ("cluffer" ,sbcl-cluffer)
       ("dexador" ,sbcl-dexador)
       ("enchant" ,sbcl-enchant)
       ("fset" ,sbcl-fset)
       ("iolib" ,sbcl-iolib)
       ("local-time" ,sbcl-local-time)
       ("log4cl" ,sbcl-log4cl)
       ("lparallel" ,sbcl-lparallel)
       ("mk-string-metrics" ,sbcl-mk-string-metrics)
       ("moptilities" ,sbcl-moptilities)
       ("osicat" ,sbcl-osicat)
       ("parenscript" ,sbcl-parenscript)
       ("plump" ,sbcl-plump)
       ("quri" ,sbcl-quri)
       ("serapeum" ,sbcl-serapeum)
       ("str" ,sbcl-cl-str)
       ("swank" ,sbcl-slime-swank)
       ("trivia" ,sbcl-trivia)
       ("trivial-clipboard" ,sbcl-trivial-clipboard)
       ("trivial-features" ,sbcl-trivial-features)
       ("trivial-package-local-nicknames" ,sbcl-trivial-package-local-nicknames)
       ("trivial-types" ,sbcl-trivial-types)
       ("unix-opts" ,sbcl-unix-opts)
       ;; WebKitGTK deps
       ("sbcl-cffi-gtk" ,sbcl-cl-cffi-gtk)
       ("sbcl-webkit" ,sbcl-cl-webkit)
       ("glib-networking" ,glib-networking)
       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
    (synopsis "Extensible web-browser in Common Lisp")
    (home-page "";)
    (description "Nyxt is a keyboard-oriented, extensible web-browser
designed for power users.  The application has familiar Emacs and VI
key-bindings and is fully configurable and extensible in Common Lisp.")
    (license license:bsd-3)))
--8<---------------cut here---------------end--------------->8---

I haven't tested StumpWM, can anyone do it?
If StumpWM passes, feel free to merge this patchset.


Pierre Neidhardt

Attachment: signature.asc
Description: PGP signature

reply via email to

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