summaryrefslogtreecommitdiff
path: root/guix/build/julia-build-system.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2022-02-23 14:47:05 +0100
committerEfraim Flashner <efraim@flashner.co.il>2022-02-24 12:20:31 +0200
commit05d469ab9da077ef2e8e3ada4bd1daee59e31312 (patch)
tree12fd6f7004dcdd1dcc0d6418310ea18672aa56dc /guix/build/julia-build-system.scm
parent637e677140658a50c6a16e9a9c5065d0931e8cf3 (diff)
build: julia: Add 'julia-package-dependencies' as keyword.
* guix/build-system/julia.scm (link-depot): Accept julia-package-dependencies keyword and use it for 'julia-create-package-toml' function. (julia-create-package-toml): Use pattern matching. (julia-build): Add 'julia-pacakge-dependencies'. * guix/build/julia-build-system.scm (julia-build): Add '#:julia-package-dependencies' keyword. Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
Diffstat (limited to 'guix/build/julia-build-system.scm')
-rw-r--r--guix/build/julia-build-system.scm14
1 files changed, 10 insertions, 4 deletions
diff --git a/guix/build/julia-build-system.scm b/guix/build/julia-build-system.scm
index 03d669be64..c5ad65d029 100644
--- a/guix/build/julia-build-system.scm
+++ b/guix/build/julia-build-system.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2019, 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
;;; Copyright © 2021 Jean-Baptiste Volatier <jbv@pm.me>
;;; Copyright © 2021, 2022 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2022 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -136,7 +137,8 @@ Project.toml)."
package "/test/runtests.jl"))))))
(define* (link-depot #:key source inputs outputs
- julia-package-name julia-package-uuid #:allow-other-keys)
+ julia-package-name julia-package-uuid
+ julia-package-dependencies #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(name+version (strip-store-file-name out))
(version (last (string-split name+version #\-)))
@@ -156,6 +158,7 @@ println(Base.version_slug(Base.UUID(\"~a\"),
(julia-create-package-toml (getcwd)
julia-package-name julia-package-uuid
version
+ julia-package-dependencies
#:file "Project.toml"))
;; When installing a package, julia looks first at in the JULIA_DEPOT_PATH
@@ -186,9 +189,10 @@ version = \"" version "\"
") f)
(when (not (null? deps))
(display "[deps]\n" f)
- (for-each (lambda dep
- (display (string-append (car (car dep)) " = \"" (cdr (car dep)) "\"\n")
- f))
+ (for-each (match-lambda
+ ((name . uuid)
+ (display (string-append name " = \"" uuid "\"\n")
+ f)))
deps))
(close-port f)))
@@ -207,6 +211,7 @@ version = \"" version "\"
(delete 'build)))
(define* (julia-build #:key inputs julia-package-name julia-package-uuid
+ julia-package-dependencies
(phases %standard-phases)
#:allow-other-keys #:rest args)
"Build the given Julia package, applying all of PHASES in order."
@@ -214,4 +219,5 @@ version = \"" version "\"
#:inputs inputs #:phases phases
#:julia-package-name julia-package-name
#:julia-package-uuid julia-package-uuid
+ #:julia-package-dependencies julia-package-dependencies
args))