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