summaryrefslogtreecommitdiff
path: root/gnu/packages/code.scm
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2022-01-10 19:10:46 +0100
committerTobias Geerinckx-Rice <me@tobias.gr>2022-01-11 20:17:50 +0000
commitd9d65f4e5bde22d8052a930e933c2e16e11d6fec (patch)
tree84784d589160d5c8fe9f5dab829b46e3e05729a0 /gnu/packages/code.scm
parent9526ce9bf1d581a92154696ce4509e1ed5d7beb5 (diff)
gnu: global: Use G-expressions.
* gnu/packages/code.scm (global)[arguments]: Rewrite as G-expressions.
Diffstat (limited to 'gnu/packages/code.scm')
-rw-r--r--gnu/packages/code.scm103
1 files changed, 53 insertions, 50 deletions
diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
index fcd83b45689..e96a55e5b0b 100644
--- a/gnu/packages/code.scm
+++ b/gnu/packages/code.scm
@@ -33,6 +33,7 @@
33;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. 33;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
34 34
35(define-module (gnu packages code) 35(define-module (gnu packages code)
36 #:use-module (guix gexp)
36 #:use-module (guix packages) 37 #:use-module (guix packages)
37 #:use-module (guix utils) 38 #:use-module (guix utils)
38 #:use-module (guix download) 39 #:use-module (guix download)
@@ -140,57 +141,59 @@ highlighting your own code that seemed comprehensible when you wrote it.")
140 "1kaphc3gml89p8dpdgh2is8hj46wj05689kxj0bmh5q759rxk4vg")))) 141 "1kaphc3gml89p8dpdgh2is8hj46wj05689kxj0bmh5q759rxk4vg"))))
141 (build-system gnu-build-system) 142 (build-system gnu-build-system)
142 (arguments 143 (arguments
143 `(#:configure-flags 144 (list #:configure-flags
144 (list (string-append "--with-ncurses=" 145 #~(list (string-append "--with-ncurses="
145 (assoc-ref %build-inputs "ncurses")) 146 #$(this-package-input "ncurses"))
146 (string-append "--with-sqlite3=" 147 (string-append "--with-sqlite3="
147 (assoc-ref %build-inputs "sqlite")) 148 #$(this-package-input "sqlite"))
148 (string-append "--with-universal-ctags=" 149 (string-append "--with-universal-ctags="
149 (assoc-ref %build-inputs "universal-ctags") "/bin/ctags") 150 #$(this-package-input "universal-ctags")
150 (string-append "--sysconfdir=" 151 "/bin/ctags")
151 (assoc-ref %outputs "out") "/share/gtags") 152 (string-append "--sysconfdir="
152 "--localstatedir=/var" ; This needs to be a writable location. 153 #$output "/share/gtags")
153 "--disable-static") 154 "--localstatedir=/var" ; This needs to be a writable location.
155 "--disable-static")
154 156
155 #:phases 157 #:phases
156 (modify-phases %standard-phases 158 #~(modify-phases %standard-phases
157 (add-after 'unpack 'fix-globash 159 (add-after 'unpack 'fix-globash
158 (lambda* (#:key inputs #:allow-other-keys) 160 (lambda* (#:key inputs #:allow-other-keys)
159 (let* ((echo (string-append 161 (substitute* "globash/globash.in"
160 (assoc-ref inputs "coreutils") "/bin/echo"))) 162 (("/bin/echo")
161 (substitute* "globash/globash.in" 163 (search-input-file inputs "bin/echo")))))
162 (("/bin/echo") echo))))) 164 (add-after 'post-install 'install-plugins
163 (add-after 'post-install 'install-plugins 165 (lambda _
164 (lambda _ 166 (with-directory-excursion "plugin-factory"
165 (with-directory-excursion "plugin-factory" 167 (invoke "make" "install"))))
166 (invoke "make" "install")))) 168 (add-before 'install 'dont-install-to-/var
167 (add-before 'install 'dont-install-to-/var 169 (lambda _
168 (lambda _ 170 (substitute* "gozilla/Makefile"
169 (substitute* "gozilla/Makefile" 171 (("DESTDIR\\)\\$\\{localstatedir\\}")
170 (("DESTDIR\\)\\$\\{localstatedir\\}") "TMPDIR)")))) 172 "TMPDIR)"))))
171 (add-after 'install-plugins 'wrap-program 173 (add-after 'install-plugins 'wrap-program
172 (lambda* (#:key inputs outputs #:allow-other-keys) 174 (lambda _
173 (wrap-program 175 (wrap-program
174 (string-append (assoc-ref outputs "out") 176 (string-append #$output
175 "/share/gtags/script/pygments_parser.py") 177 "/share/gtags/script/pygments_parser.py")
176 `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))))) 178 `("GUIX_PYTHONPATH" ":" prefix
177 (add-after 'install 'post-install 179 (,(getenv "GUIX_PYTHONPATH"))))))
178 (lambda* (#:key outputs #:allow-other-keys) 180 (add-after 'install 'post-install
179 ;; Install the plugin files in the right place. 181 (lambda _
180 (let* ((out (assoc-ref outputs "out")) 182 ;; Install the plugin files in the right place.
181 (data (string-append out "/share/gtags")) 183 (let* ((data (string-append #$output "/share/gtags"))
182 (vim (string-append out "/share/vim/vimfiles/plugin")) 184 (vim (string-append #$output
183 (lisp (string-append out "/share/emacs/site-lisp/" 185 "/share/vim/vimfiles/plugin"))
184 ,(package-name this-package) "-" 186 (lisp (string-append #$output "/share/emacs/site-lisp/"
185 ,(package-version this-package)))) 187 #$(package-name this-package) "-"
186 (mkdir-p lisp) 188 #$(package-version this-package))))
187 (mkdir-p vim) 189 (mkdir-p lisp)
188 (rename-file (string-append data "/gtags.el") 190 (mkdir-p vim)
189 (string-append lisp "/gtags.el")) 191 (rename-file (string-append data "/gtags.el")
190 (rename-file (string-append data "/gtags.vim") 192 (string-append lisp "/gtags.el"))
191 (string-append vim "/gtags.vim")) 193 (rename-file (string-append data "/gtags.vim")
192 (rename-file (string-append data "/gtags-cscope.vim") 194 (string-append vim "/gtags.vim"))
193 (string-append vim "/gtags-cscope.vim")))))))) 195 (rename-file (string-append data "/gtags-cscope.vim")
196 (string-append vim "/gtags-cscope.vim"))))))))
194 (inputs 197 (inputs
195 (list bash-minimal ; for wrap-program 198 (list bash-minimal ; for wrap-program
196 coreutils 199 coreutils