gnu: ruby-sassc: Update to 2.2.1.

* gnu/packages/ruby.scm (ruby-sassc): Update to 2.2.1.
[arguments]: Fix using the included libsass copy.
[native-inputs]: Add ruby-rake-compiler.
This commit is contained in:
Christopher Baines 2020-01-16 22:28:39 +00:00
parent 7037ffe11a
commit 3e776b4426
No known key found for this signature in database
GPG key ID: 5E28A33B0B84F577

View file

@ -7764,23 +7764,34 @@ (define-public ruby-sass
(define-public ruby-sassc (define-public ruby-sassc
(package (package
(name "ruby-sassc") (name "ruby-sassc")
(version "2.0.1") (version "2.2.1")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (rubygems-uri "sassc" version)) (uri (rubygems-uri "sassc" version))
(sha256 (sha256
(base32 (base32
"1sr4825rlwsrl7xrsm0sgalcpf5zgp4i56dbi3qxfa9lhs8r6zh4")))) "09bnid7r5z5hcin5hykvpvv8xig27wbbckxwis60z2aaxq4j9siz"))))
(build-system ruby-build-system) (build-system ruby-build-system)
(arguments (arguments
'(#:phases '(#:modules ((guix build ruby-build-system)
(guix build utils)
(ice-9 textual-ports))
#:phases
(modify-phases %standard-phases (modify-phases %standard-phases
;; TODO: This would be better as a snippet, but the ruby-build-system ;; TODO: This would be better as a snippet, but the ruby-build-system
;; doesn't seem to support that ;; doesn't seem to support that
(add-after 'unpack 'remove-libsass (add-after 'unpack 'remove-libsass
(lambda _ (lambda _
(delete-file-recursively "ext") (delete-file-recursively "ext")
(with-atomic-file-replacement "sassc.gemspec"
(lambda (in out)
(let* ((gemspec (get-string-all in))
(index (string-contains gemspec "libsass_dir")))
(display (string-append
(string-take gemspec index)
"\nend\n")
out))))
#t)) #t))
(add-after 'unpack 'dont-check-the-libsass-version (add-after 'unpack 'dont-check-the-libsass-version
(lambda _ (lambda _
@ -7790,18 +7801,17 @@ (define-public ruby-sassc
(add-after 'unpack 'remove-git-from-gemspec (add-after 'unpack 'remove-git-from-gemspec
(lambda _ (lambda _
(substitute* "sassc.gemspec" (substitute* "sassc.gemspec"
(("`git ls-files -z`") "`find . -type f -print0 |sort -z`") (("`git ls-files -z`") "`find . -type f -print0 |sort -z`"))
(("`git submodule --quiet foreach pwd`") "''"))
#t)) #t))
(add-after 'unpack 'remove-extensions-from-gemspec (add-after 'unpack 'remove-extensions-from-gemspec
(lambda _ (lambda _
(substitute* "sassc.gemspec" (substitute* "sassc.gemspec"
(("\\[\"ext/Rakefile\"\\]") "[]")) (("\\[\"ext/extconf.rb\"\\]") "[]"))
#t)) #t))
(add-after 'unpack 'fix-Rakefile (add-after 'unpack 'fix-Rakefile
(lambda _ (lambda _
(substitute* "Rakefile" (substitute* "Rakefile"
(("test: 'libsass:compile'") ":test")) (("test: 'compile:libsass'") ":test"))
#t)) #t))
(add-after 'unpack 'remove-unnecessary-dependencies (add-after 'unpack 'remove-unnecessary-dependencies
(lambda _ (lambda _
@ -7826,6 +7836,7 @@ (define-public ruby-sassc
`(("libsass" ,libsass))) `(("libsass" ,libsass)))
(native-inputs (native-inputs
`(("bundler" ,bundler) `(("bundler" ,bundler)
("ruby-rake-compiler" ,ruby-rake-compiler)
("ruby-minitest-around" ,ruby-minitest-around) ("ruby-minitest-around" ,ruby-minitest-around)
("ruby-test-construct" ,ruby-test-construct))) ("ruby-test-construct" ,ruby-test-construct)))
(synopsis "Use libsss from Ruby") (synopsis "Use libsss from Ruby")