From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Patterson Subject: bug#32769: Packaging Next browser (Common Lisp) [work in progress] Date: Mon, 15 Oct 2018 02:05:05 -0400 Message-ID: <20181015020505.2387a8c7@mailservices.uwaterloo.ca> References: <87va6a7x9l.fsf@ambrevar.xyz> <20181011031649.5863f9a8@mailservices.uwaterloo.ca> <87va68uatd.fsf@ambrevar.xyz> <87sh1cu5ic.fsf@ambrevar.xyz> <20181012015120.686812a8@mailservices.uwaterloo.ca> <87ftxbslyk.fsf@ambrevar.xyz> <20181012182510.693c28f6@mailservices.uwaterloo.ca> <878t31kk59.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38819) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBw11-0005t9-FE for bug-guix@gnu.org; Mon, 15 Oct 2018 02:06:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gBw0x-0007AR-Kz for bug-guix@gnu.org; Mon, 15 Oct 2018 02:06:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:45466) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gBw0w-00078w-KK for bug-guix@gnu.org; Mon, 15 Oct 2018 02:06:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gBw0w-0001Zl-8L for bug-guix@gnu.org; Mon, 15 Oct 2018 02:06:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <878t31kk59.fsf@ambrevar.xyz> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Pierre Neidhardt Cc: 32769@debbugs.gnu.org Hi Pierre, On Sun, 14 Oct 2018 10:27:46 +0200 Pierre Neidhardt wrote: > I won't have time this weekend, so you can go ahead. Otherwise I'll > do it next week. I investigated the problem and I think the build-program procedure is ok. It has the option to specify which dependencies you want (maybe that's what you used?), and I think that's the right option. You said that you'd tried passing "next" in some way - in this case the system that the executable will depend on is "next-gtk". There's a couple of things here - firstly we need a system for "next" and a separate one for "next/gtk". The other is that the resulting systems will be normalized, so we'll end up with "next-gtk" as the system that we want to use a dependency for the next-browser executable. I made these changes and found that I still had problems building next. I managed to figure out that it's because next exercises some less common asd options which makes the bundle that it outputs not conform to the expectations of the build system. We'll have to make some changes to accommodate that, but for now, here's a patch that makes next build. I wasn't able to really test whether or not it works - it throws an exception whenever I press a key. I was able to find out that its *active-buffer* variable is nil, which it expects not to be. If you want to debug the problems, I recommend doing something like=20 $ guix environment --ad-hoc sbcl sbcl-slynk:image next-browser:lib && slynk.image * (slynk:create-server :port 4545) and then connecting from sly. You might also pass (sb-ext:enable-debugger) to the entry program if you prefer that interface but I haven't tried. You can then run |> (asdf:load-system 'next-gtk) |> (next:start) to get started. Hoping that helps, -- Andy =46rom 452bb2919ab1db6d819973d655407b1a335b2741 Mon Sep 17 00:00:00 2001 From: Andy Patterson Date: Mon, 15 Oct 2018 01:59:25 -0400 Subject: [PATCH] gnu: next-browser: Fix the build. * gnu/packages/web-browsers.scm (next-browser-core): New variable. (next-browser): Inherit from next-browser-core. --- gnu/packages/lisp.scm | 1 + gnu/packages/web-browsers.scm | 59 ++++++++++++++++++++++++----------- 2 files changed, 42 insertions(+), 18 deletions(-) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index fcd3156a7..1b390b66d 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -30,6 +30,7 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix hg-download) #:use-module (guix git-download) #:use-module (guix utils) #:use-module (guix build-system gnu) diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm index 0df9180d7..c6844c868 100644 --- a/gnu/packages/web-browsers.scm +++ b/gnu/packages/web-browsers.scm @@ -25,6 +25,7 @@ (define-module (gnu packages web-browsers) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) + #:use-module (guix utils) #:use-module (gnu packages) #:use-module (gnu packages compression) #:use-module (gnu packages databases) @@ -324,10 +325,10 @@ access.") GUI. It is based on PyQt5 and QtWebKit.") (license license:gpl3+))) =20 -(define-public next-browser +(define-public next-browser-core (let ((commit "ccc289b44610ada4ae9c875910af7720e85b546b")) (package - (name "next-browser") + (name "next-browser-core") (version (git-version "0.0.8" "1" commit)) (source (origin (method git-fetch) @@ -338,11 +339,11 @@ GUI. It is based on PyQt5 and QtWebKit.") (search-patches "next-fix-duplicate-function.patch")) (sha256 (base32 - "1pcpb274zb0qm26rrglgcgzg2d2v7j2aja5685swwyq9rcqlbdf4"))= )) + "0rccs9w49p577l12kgykccxrjkr03rf1cfz9mvxbjzc8g82dya2k")) + (file-name (git-file-name name version)))) (build-system asdf-build-system/sbcl) ;; TODO: Move Common Lisp libraries to "native-inputs"? ;; TODO: Does runtime depends on gsettings-desktop-schemas and glib-= networking? - (outputs '("out" "lib")) (inputs `(("alexandria" ,sbcl-alexandria) ("cl-strings" ,sbcl-cl-strings) @@ -352,26 +353,48 @@ GUI. It is based on PyQt5 and QtWebKit.") ("cl-sqlite" ,sbcl-cl-sqlite) ("parenscript" ,sbcl-parenscript) ("cl-json" ,sbcl-cl-json) - ("unix-opts" ,sbcl-unix-opts) - ("cl-cffi-gtk" ,sbcl-cl-cffi-gtk) - ("cl-webkit" ,sbcl-cl-webkit) - ("lparallel" ,sbcl-lparallel))) + ("unix-opts" ,sbcl-unix-opts))) (arguments `( ;; #:tests? #f #:asd-file "next/next.asd" - #:asd-system-name "next/gtk" - #:phases - (modify-phases %standard-phases - (add-after 'create-symlinks 'build-program - (lambda* (#:key outputs #:allow-other-keys) - (build-program - (string-append (assoc-ref outputs "out") "/bin/next-browse= r") - outputs - #:entry-program '((next:start) 0))))) - )) + #:asd-system-name "next")) (home-page "http://next.atlas.engineer/") (synopsis "Emacs-inspired web browser in extensible in Common Lisp") (description "Next is a keyboard-oriented, extensible web-browser in= spired by Emacs and designed for power users. The application has familiar key-bindings, is fully configurable and extensible in Lisp.") (license license:expat)))) + +(define-public next-browser + (package + (inherit next-browser-core) + (name "next-browser") + (outputs '("out" "lib")) + (inputs + `(("next" ,next-browser-core) + ("cl-cffi-gtk" ,sbcl-cl-cffi-gtk) + ("cl-webkit" ,sbcl-cl-webkit) + ("lparallel" ,sbcl-lparallel))) + (arguments + (substitute-keyword-arguments (package-arguments next-browser-core) + ((#:asd-system-name _ #f) "next/gtk") + ((#:phases phases '%standard-phases) + `(modify-phases ,phases + (add-before 'cleanup 'move-bundle + (lambda* (#:key outputs #:allow-other-keys) + (define lib (assoc-ref outputs "lib")) + (define actual-fasl (string-append + lib + "/lib/sbcl/next/source/next-gtk.fasl")) + (define expected-fasl (string-append + lib + "/lib/sbcl/gtk--system.fasl")) + (copy-file actual-fasl expected-fasl) + #t)) + (add-after 'create-symlinks 'build-program + (lambda* (#:key outputs #:allow-other-keys) + (build-program + (string-append (assoc-ref outputs "out") "/bin/next-browse= r") + outputs + #:entry-program '((next:start) 0) + #:dependencies '("next-gtk")))))))))) --=20 2.19.1