Skip to content

Commit

Permalink
Move Nyxt' specific ASD code from nasdf to nyxt.asd.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ambrevar committed Dec 20, 2022
1 parent 11aaa01 commit 8da7313
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 25 deletions.
3 changes: 1 addition & 2 deletions libraries/nasdf/nasdf.asd
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@
(:file "submodules")
(:file "systems")
(:file "tests")
(:file "compilation-tests")
(:file "user-systems")))
(:file "compilation-tests")))
13 changes: 0 additions & 13 deletions libraries/nasdf/systems.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,3 @@ to go to the compilation error location."
(if (env-true-p "NASDF_USE_LOGICAL_PATHS")
final-path
(translate-logical-pathname final-path))))))

(defclass nyxt-renderer-system (asdf:system) ()
(:documentation "Specialized systems for Nyxt with renderer dependency.
The renderer is configured from NYXT_RENDERER or `*nyxt-renderer*'."))
(import 'nyxt-renderer-system :asdf-user)

(export-always '*nyxt-renderer*)
(defvar *nyxt-renderer* (or (getenv "NYXT_RENDERER")
"gi-gtk"))

(defmethod asdf:component-depends-on ((o asdf:prepare-op) (c nyxt-renderer-system))
`((asdf:load-op ,(format nil "nyxt/~a-application" *nyxt-renderer*))
,@(call-next-method)))
9 changes: 0 additions & 9 deletions libraries/nasdf/user-systems.lisp

This file was deleted.

23 changes: 22 additions & 1 deletion nyxt.asd
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,27 @@
(sb-ext:assert-version->= 2 0 0)
(require 'sb-bsd-sockets))

(uiop:define-package nyxt-asdf
(:use :cl))
(in-package :nyxt-asdf)

;; (export-always 'nyxt-user-system)
;; (defclass nyxt-user-system (asdf:system) ()
;; (:documentation "Specialized systems for Nyxt users."))
;; (import 'nyxt-user-system :asdf-user)

(defclass nyxt-renderer-system (asdf:system) ()
(:documentation "Specialized systems for Nyxt with renderer dependency.
The renderer is configured from NYXT_RENDERER or `*nyxt-renderer*'."))

(export-always '*nyxt-renderer*)
(defvar *nyxt-renderer* (or (getenv "NYXT_RENDERER")
"gi-gtk"))

(defmethod asdf:component-depends-on ((o asdf:prepare-op) (c nyxt-renderer-system))
`((asdf:load-op ,(format nil "nyxt/~a-application" *nyxt-renderer*))
,@(call-next-method)))

;; WARNING: We _must_ declare the translation host or else ASDF won't recognize
;; the pathnames as logical-pathnames, thus returning the system directory
;; instead.
Expand Down Expand Up @@ -403,7 +424,7 @@

(defsystem "nyxt/install"
:defsystem-depends-on ("nasdf")
:class :nasdf-renderer-system
:class :nyxt-renderer-system
:depends-on (alexandria
nyxt/version
str)
Expand Down

0 comments on commit 8da7313

Please sign in to comment.