1 (defpackage org.lispbuilds.nix
/main
3 :org.lispbuilds.nix
/database
/sqlite
4 :org.lispbuilds.nix
/repository
/quicklisp
5 :org.lispbuilds.nix
/api
)
9 (in-package org.lispbuilds.nix
/main
)
11 (defun resource (name type
)
13 :defaults
(asdf:system-source-directory
:org.lispbuilds.nix
)
20 :init-file
(resource "init" "sql")
21 :url
"packages.sqlite"))
23 (defvar *quicklisp
* nil
)
25 (defun get-quicklisp-version ()
26 (let ((response (http:get
"http://beta.quicklisp.org/dist/quicklisp.txt")))
28 (second (uiop:split-string response
:separator
'(#\Newline
)))
31 (defun init-quicklisp ()
37 "https://beta.quicklisp.org/dist/quicklisp/~a/"
38 (get-quicklisp-version)))))
40 (defun run-importers ()
41 (ignore-errors (delete-file "packages.sqlite"))
42 (import-lisp-packages *quicklisp
* *sqlite
*)
43 (format t
"Imported packages from quicklisp to ~A~%"
44 (truename "packages.sqlite")))
46 (defun gen-nix-file ()
47 (database->nix-expression
*sqlite
* "imported.nix")
48 (format t
"Dumped nix file to ~a~%"
49 (truename "imported.nix")))