From 98fbbbd08de396cd8a0e45f2a4badf1c733a5772 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 25 Oct 2019 09:05:28 +0200 Subject: Use Makefile. --- Makefile | 17 +++++++++++++++++ README.org | 8 +++++--- guix/rekado/guile-studio.scm | 43 ++++++++++++++++++------------------------- 3 files changed, 40 insertions(+), 28 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..34ae7a6 --- /dev/null +++ b/Makefile @@ -0,0 +1,17 @@ +VERSION = 0.0.1 + +SOURCES = \ + guile-studio-configure.scm \ + logo.svg \ + Makefile \ + README.org + +build: + mkdir -p $(PREFIX)/bin && \ + mkdir -p $(PREFIX)/share && \ + guile -s guile-studio-configure.scm \ + $(PREFIX) $(EMACS_DIR) $(GUILE_DIR) $(PICT_DIR) $(ICONS_DIR) $(INPUTS) + +dist: + mkdir -p guile-studio && cp $(SOURCES) guile-studio && \ + tar -czf guile-studio-$(VERSION).tar.gz guile-studio diff --git a/README.org b/README.org index 371ae38..3dde643 100644 --- a/README.org +++ b/README.org @@ -13,6 +13,8 @@ pleasant Guile + Geiser experience out of the box. To build Guile Studio from source with Guix and run it try this: - git clone https://git.elephly.net/software/guile-studio.git - cd guile-studio - $(guix build -L guix guile-studio-devel)/bin/guile-studio +#+BEGIN_SRC sh +git clone https://git.elephly.net/software/guile-studio.git +cd guile-studio +make dist && $(guix build -L guix guile-studio-devel)/bin/guile-studio +#+END_SRC diff --git a/guix/rekado/guile-studio.scm b/guix/rekado/guile-studio.scm index ca14a1e..79e6d8b 100644 --- a/guix/rekado/guile-studio.scm +++ b/guix/rekado/guile-studio.scm @@ -8,41 +8,32 @@ (gnu packages guile-xyz) (gnu packages emacs) (gnu packages emacs-xyz) - (gnu packages gnome)) - - -;;; XXX big bad hack... -(system* "tar" "-cf" "/tmp/guile-studio.tar" - "--exclude-vcs" "--exclude" "guix" - "-C" "/home/rekado/dev/" "guile-studio") + (gnu packages gnome) + (gnu packages texinfo)) (define-public guile-studio (package (name "guile-studio-devel") - (version "0") - (source "/tmp/guile-studio.tar") + (version "0.0.1") + (source (local-file (string-append "../../guile-studio-" version ".tar.gz"))) (build-system gnu-build-system) (arguments `(#:tests? #f ; there are none + #:make-flags + (list (string-append "ICONS_DIR=" + (assoc-ref %build-inputs "adwaita-icon-theme") + "/share/icons/Adwaita/") + (string-append "PICT_DIR=" + (assoc-ref %build-inputs "guile-picture-language")) + (string-append "EMACS_DIR=" + (assoc-ref %build-inputs "emacs")) + (string-append "GUILE_DIR=" + (assoc-ref %build-inputs "guile")) + (string-join (cons "INPUTS=" (map cdr %build-inputs))) + (string-append "PREFIX=" (assoc-ref %outputs "out"))) #:phases (modify-phases %standard-phases (delete 'configure) - (replace 'build - (lambda* (#:key source inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin/")) - (share (string-append out "/share/"))) - (mkdir-p share) - (mkdir-p bin) - (apply invoke "guile" "-s" - "guile-studio-configure.scm" - out - (assoc-ref inputs "emacs") - (assoc-ref inputs "guile-picture-language") - (string-append (assoc-ref inputs "adwaita-icon-theme") - "/share/icons/Adwaita/") - (map cdr inputs)) - #t))) (delete 'install)))) (inputs `(("guile" ,guile-2.2) @@ -54,6 +45,8 @@ ("emacs-smart-mode-line" ,emacs-smart-mode-line) ("emacs-paren-face" ,emacs-paren-face) ("adwaita-icon-theme" ,adwaita-icon-theme))) + (native-inputs + `(("texinfo" ,texinfo))) (home-page "https://gnu.org/software/guile") (synopsis "Totally not a cheap copy of Dr Racket for Guile") (description -- cgit v1.2.3