summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am6
-rw-r--r--README.md4
-rw-r--r--[-rwxr-xr-x]guix/scripts/web.scm (renamed from scripts/guix-web)23
3 files changed, 13 insertions, 20 deletions
diff --git a/Makefile.am b/Makefile.am
index a36f988..ee0cab2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -29,9 +29,7 @@ SOURCES = \
guix-web/util.scm \
guix-web/sxml.scm \
guix-web/view/html.scm \
- guix-web/view/json.scm
+ guix-web/view/json.scm \
+ guix/scripts/web.scm
EXTRA_DIST += env.in
-
-dev-server:
- ./pre-inst-env scripts/guix-web
diff --git a/README.md b/README.md
index 40592ee..5c6f749 100644
--- a/README.md
+++ b/README.md
@@ -26,8 +26,8 @@ Wishlist
Use
---
-To run guix-web from the root of the source tree, simply run `make
-dev-server` and visit `localhost:8080` in your web browser.
+To run guix-web from the root of the source tree, simply run `guix
+web` and visit `localhost:8080` in your web browser.
Dependencies
------------
diff --git a/scripts/guix-web b/guix/scripts/web.scm
index eeefa08..da6270e 100755..100644
--- a/scripts/guix-web
+++ b/guix/scripts/web.scm
@@ -1,8 +1,5 @@
-#!/usr/bin/guile
-!#
-
;;; guix-web - Web interface for GNU Guix
-;;; Copyright © 2014 David Thompson <davet@gnu.org>
+;;; Copyright © 2014, 2015 David Thompson <davet@gnu.org>
;;;
;;; This program is free software: you can redistribute it and/or
;;; modify it under the terms of the GNU Affero General Public License
@@ -18,14 +15,12 @@
;;; License along with this program. If not, see
;;; <http://www.gnu.org/licenses/>.
-(use-modules (system repl server)
- (guix-web controller)
- (guix-web server))
-
-(spawn-server (make-tcp-server-socket #:port 37146))
-(start-guix-web (lambda (path) (controller path)))
+(define-module (guix scripts web)
+ #:use-module (system repl server)
+ #:use-module (guix-web controller)
+ #:use-module (guix-web server)
+ #:export (guix-web))
-;;; Local Variables:
-;;; mode: scheme
-;;; compile-command: "cd ..; ./pre-inst-env guix-web"
-;;; End:
+(define (guix-web . args)
+ (spawn-server (make-tcp-server-socket #:port 37146))
+ (start-guix-web (lambda (path) (controller path))))