Skip to content

Commit

Permalink
Stable version with caching, ruby and python loaders, and python and …
Browse files Browse the repository at this point in the history
…node ports.
  • Loading branch information
viferga committed Dec 17, 2019
1 parent fffb594 commit d6ac9d3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion scripts/deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
export GUILE_WARN_DEPRECATED='detailed'

# Build dependencies
`# Build` guix build libnode ruby node-addon-api -L /metacall/source \
`# Build` guix build libnode dynruby node-addon-api -L /metacall/source \
`# Exit` && exit 0 || exit 1
19 changes: 10 additions & 9 deletions source/metacall.scm
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,9 @@ devices.")
)

; Ruby
(define-public ruby
(define-public dynruby
(package
(name "ruby")
(name "dynruby")
(version "2.3.8")
(source
(origin
Expand Down Expand Up @@ -322,7 +322,8 @@ a focus on simplicity and productivity.")
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(setenv "LDFLAGS" (string-append "-Wl,-rpath=" out "/lib"))
(setenv "HOME" "/tmp")
; TODO: NPM fails with cb()
; (setenv "HOME" "/tmp")
#t))))
; TODO: Enable tests
#:tests? #f
Expand Down Expand Up @@ -364,12 +365,12 @@ a focus on simplicity and productivity.")
"-DOPTION_BUILD_LOADERS_PY=ON"
"-DOPTION_BUILD_LOADERS_RB=ON"
"-DOPTION_BUILD_LOADERS_FILE=ON"
"-DOPTION_BUILD_LOADERS_NODE=ON"
"-DOPTION_BUILD_LOADERS_NODE=OFF" ; TODO: Enable node loader

; TODO: Avoid harcoded versions of Ruby
(string-append "-DRUBY_EXECUTABLE=" (assoc-ref %build-inputs "ruby") "/bin/ruby")
(string-append "-DRUBY_INCLUDE_DIR=" (assoc-ref %build-inputs "ruby") "/include/ruby-2.3.0")
(string-append "-DRUBY_LIBRARY=" (assoc-ref %build-inputs "ruby") "/lib/libruby.so")
(string-append "-DRUBY_EXECUTABLE=" (assoc-ref %build-inputs "dynruby") "/bin/ruby")
(string-append "-DRUBY_INCLUDE_DIR=" (assoc-ref %build-inputs "dynruby") "/include/ruby-2.3.0")
(string-append "-DRUBY_LIBRARY=" (assoc-ref %build-inputs "dynruby") "/lib/libruby.so")
(string-append "-DRUBY_VERSION=2.3.8")

; TODO: Avoid harcoded versions of NodeJS
Expand Down Expand Up @@ -402,14 +403,14 @@ a focus on simplicity and productivity.")
("rapidjson" ,rapidjson)
; TODO: Package only the runtime lib for each runtime
("python" ,python)
("ruby" ,ruby)
("dynruby" ,dynruby)
("libnode" ,libnode)
)
)
(native-inputs
`(
("python" ,python)
("ruby" ,ruby)
("dynruby" ,dynruby)
("node" ,node)
("node-addon-api" ,node-addon-api)
("swig" ,swig)
Expand Down

0 comments on commit d6ac9d3

Please sign in to comment.