guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: ruby-rack: Don't use unstable tarball.


From: guix-commits
Subject: 02/02: gnu: ruby-rack: Don't use unstable tarball.
Date: Mon, 30 Dec 2019 08:57:45 -0500 (EST)

efraim pushed a commit to branch master
in repository guix.

commit 83870c32e8bbe5a70d58cbc9bdd98892e95dc5dc
Author: Efraim Flashner <address@hidden>
Date:   Mon Dec 30 12:46:55 2019 +0200

    gnu: ruby-rack: Don't use unstable tarball.
    
    * gnu/packages/ruby.scm (ruby-rack)[source]: Download using git-fetch.
    [arguments]: Add phase to make gzip files writable.
---
 gnu/packages/ruby.scm | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 6203352..10c887e 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -5068,16 +5068,15 @@ generates Ruby program.")
     (version "2.0.6")
     (source
      (origin
-       (method url-fetch)
+       (method git-fetch)
        ;; Download from GitHub so that the patch can be applied.
-       (uri (string-append
-             "https://github.com/rack/rack/archive/";
-             version
-             ".tar.gz"))
-       (file-name (string-append name "-" version ".tar.gz"))
+       (uri (git-reference
+              (url "https://github.com/rack/rack";)
+              (commit version)))
+       (file-name (git-file-name name version))
        (sha256
         (base32
-         "0pb3g5ymvbf07xaxcn51dpqv3djlxavckp3qkxsjdxiqznb0d9p1"))
+         "1n7z4g1x6yxip096cdc04wq7yk7ywpinq28g2xjb46r4nlv5h0j6"))
        ;; Ignore test which fails inside the build environment but works
        ;; outside.
        (patches (search-patches "ruby-rack-ignore-failing-test.patch"))))
@@ -5103,7 +5102,15 @@ generates Ruby program.")
                                  (number->string (+ 22 size-diff))
                                  "-"
                                  (number->string (+ 33 size-diff))))))
-             #t)))))
+             #t))
+         (add-before 'reset-gzip-timestamps 'make-files-writable
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Make sure .gz files are writable so that the
+             ;; 'reset-gzip-timestamps' phase can do its work.
+             (let ((out (assoc-ref outputs "out")))
+               (for-each make-file-writable
+                         (find-files out "\\.gz$"))
+               #t))))))
     (native-inputs
      `(("ruby-minitest" ,ruby-minitest)
        ("ruby-minitest-sprint" ,ruby-minitest-sprint)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]