gnu: ruby-rbnacl: Use new package style.

* gnu/packages/ruby.scm (ruby-rbnacl): Use new package style.
[arguments]: Use gexp.
[source, propagated-inputs, inputs, native-inputs]: Restyle format.

Signed-off-by: Christopher Baines <mail@cbaines.net>
This commit is contained in:
gemmaro 2023-07-09 14:57:20 +09:00 committed by Christopher Baines
parent 98eaf21d4a
commit f6e6d5981f
No known key found for this signature in database
GPG key ID: 5E28A33B0B84F577

View file

@ -3250,50 +3250,50 @@ (define-public ruby-rbnacl
(package (package
(name "ruby-rbnacl") (name "ruby-rbnacl")
(version "7.1.1") (version "7.1.1")
(source (source (origin
(origin (method url-fetch)
(method url-fetch) (uri (rubygems-uri "rbnacl" version))
(uri (rubygems-uri "rbnacl" version)) (sha256
(sha256 (base32
(base32 "0y8yzianlkc9w6sbqy8iy8l0yym0y6x7p5rjflkfixq76fqmhvzk"))))
"0y8yzianlkc9w6sbqy8iy8l0yym0y6x7p5rjflkfixq76fqmhvzk"))))
(build-system ruby-build-system) (build-system ruby-build-system)
(arguments (arguments
`(#:phases (list
(modify-phases %standard-phases #:phases
(add-after 'unpack 'remove-unnecessary-dependencies #~(modify-phases %standard-phases
(lambda _ (add-after 'unpack 'remove-unnecessary-dependencies
;; Coveralls relates to a network service, and Rubocop to code (lambda _
;; linting and both are unnecessary to run the tests ;; Coveralls relates to a network service, and Rubocop to code
(substitute* "Gemfile" ;; linting and both are unnecessary to run the tests
((".*rubocop.*") "\n") (substitute* "Gemfile"
((".*guard-rspec.*") "\n") ((".*rubocop.*")
((".*coveralls.*") "\n")) "\n")
(substitute* "spec/spec_helper.rb" ((".*guard-rspec.*")
(("require \"coveralls\"") "") "\n")
(("Coveralls.wear!") "")) ((".*coveralls.*")
#t)) "\n"))
(add-after 'unpack 'use-libsodium-from-store (substitute* "spec/spec_helper.rb"
(lambda* (#:key inputs #:allow-other-keys) (("require \"coveralls\"")
(substitute* '("lib/rbnacl/init.rb" "")
"lib/rbnacl/sodium.rb") (("Coveralls.wear!")
(("ffi_lib \\[.+\\]") ""))))
(string-append "ffi_lib [\"" (add-after 'unpack 'use-libsodium-from-store
(assoc-ref inputs "libsodium") "/lib/libsodium.so" (lambda* (#:key inputs #:allow-other-keys)
"\"]"))) (substitute* '("lib/rbnacl/init.rb"
#t)) "lib/rbnacl/sodium.rb")
;; Run Rspec directly to avoid the Rubocop dependency in the Rakefile (("ffi_lib \\[.+\\]")
(replace 'check (string-append "ffi_lib [\""
(lambda* (#:key tests? #:allow-other-keys) (assoc-ref inputs "libsodium")
(when tests? "/lib/libsodium.so" "\"]")))))
(invoke "rspec")) ;; Run Rspec directly to avoid the Rubocop dependency in the
#t))))) ;; Rakefile
(propagated-inputs (replace 'check
(list ruby-ffi)) (lambda* (#:key tests? #:allow-other-keys)
(inputs (when tests?
(list libsodium)) (invoke "rspec")))))))
(native-inputs (propagated-inputs (list ruby-ffi))
(list bundler ruby-rspec)) (inputs (list libsodium))
(native-inputs (list bundler ruby-rspec))
(synopsis "Ruby FFI binding to libsodium") (synopsis "Ruby FFI binding to libsodium")
(description (description
"This package provides Ruby FFI bindings to the Networking and "This package provides Ruby FFI bindings to the Networking and