guix-commits
[Top][All Lists]
Advanced

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

06/08: import: hackage: Handle CRLF end of line style.


From: Federico Beffa
Subject: 06/08: import: hackage: Handle CRLF end of line style.
Date: Thu, 26 Nov 2015 17:18:54 +0000

beffa pushed a commit to branch master
in repository guix.

commit 96018e21e7a84c343c1a019fa5c6ef3c15fb24d6
Author: Federico Beffa <address@hidden>
Date:   Sat Nov 14 15:15:00 2015 +0100

    import: hackage: Handle CRLF end of line style.
    
    * guix/import/hackage.scm (hackage-fetch, hackage->guix-package): Use
      'canonical-newline-port'.
---
 guix/import/hackage.scm |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm
index 3baa514..8725ffa 100644
--- a/guix/import/hackage.scm
+++ b/guix/import/hackage.scm
@@ -22,7 +22,8 @@
   #:use-module (srfi srfi-11)
   #:use-module (srfi srfi-1)
   #:use-module ((guix download) #:select (download-to-store))
-  #:use-module ((guix utils) #:select (package-name->name+version))
+  #:use-module ((guix utils) #:select (package-name->name+version
+                                       canonical-newline-port))
   #:use-module (guix import utils)
   #:use-module (guix import cabal)
   #:use-module (guix store)
@@ -84,7 +85,8 @@ version."
     (call-with-temporary-output-file
      (lambda (temp port)
        (and (url-fetch url temp)
-            (call-with-input-file temp read-cabal))))))
+            (call-with-input-file temp
+              (compose read-cabal canonical-newline-port)))))))
 
 (define string->license
   ;; List of valid values from
@@ -216,7 +218,7 @@ to the Cabal file format definition.  The default value 
associated with the
 keys \"os\", \"arch\" and \"impl\" is \"linux\", \"x86_64\" and \"ghc\"
 respectively."
   (let ((cabal-meta (if port
-                        (read-cabal port)
+                        (read-cabal (canonical-newline-port port))
                         (hackage-fetch package-name))))
     (and=> cabal-meta (compose (cut hackage-module->sexp <>
                                     #:include-test-dependencies? 



reply via email to

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