From 726ecfeb3ae9eb4baacf042e2dd34b1e377dccfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 25 Jul 2017 17:06:51 +0200 Subject: gnu: Add guile2.0-bytestructures. * gnu/packages/patches/guile-bytestructures-name-clash.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/guile.scm (guile-bytestructures)[source]: Use it. [arguments]: Unpack the source. [native-inputs]: New field. (guile2.0-bytestructures): New variable. --- gnu/packages/guile.scm | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'gnu/packages/guile.scm') diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index dd852cb3e6..21cc59ef04 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -1543,16 +1543,28 @@ is no support for parsing block and inline level HTML.") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "04lgh0nk6ddnwgh20hnz4pyhczaik0xbd50kikjsxcwcl46shavb")))) + "04lgh0nk6ddnwgh20hnz4pyhczaik0xbd50kikjsxcwcl46shavb")) + (patches (search-patches "guile-bytestructures-name-clash.patch")))) (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) #:builder (begin (use-modules (guix build utils) + (ice-9 ftw) (ice-9 match) (ice-9 popen) (ice-9 rdelim)) + ;; Unpack. + (setenv "PATH" + (string-join (list (assoc-ref %build-inputs "tar") + (assoc-ref %build-inputs "xz")) + "/bin:" 'suffix)) + (system* "tar" "xf" (assoc-ref %build-inputs "source")) + (match (scandir ".") + (("." ".." directory) + (chdir directory))) + (let* ((out (assoc-ref %outputs "out")) (guile (assoc-ref %build-inputs "guile")) (effective (read-line @@ -1561,7 +1573,7 @@ is no support for parsing block and inline level HTML.") "-c" "(display (effective-version))"))) (module-dir (string-append out "/share/guile/site/" effective)) - (source (assoc-ref %build-inputs "source")) + (source (getcwd)) (doc (string-append out "/share/doc/scheme-bytestructures")) (sld-files (with-directory-excursion source (find-files "bytestructures/r7" "\\.exports.sld$"))) @@ -1601,6 +1613,9 @@ is no support for parsing block and inline level HTML.") ;; Also copy over the README. (install-file "README.md" doc) #t)))) + (native-inputs + `(("tar" ,tar) + ("xz" ,xz))) (inputs `(("guile" ,guile-2.2))) (home-page "https://github.com/TaylanUB/scheme-bytestructures") @@ -1613,6 +1628,9 @@ an abstraction over raw memory. It's also more powerful than the C type system, elevating types to first-class status.") (license license:gpl3+))) +(define-public guile2.0-bytestructures + (package-for-guile-2.0 guile-bytestructures)) + (define-public guile-aspell (package (name "guile-aspell") -- cgit v1.2.3