help-guix
[Top][All Lists]
Advanced

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

Re: streamlining custom package development


From: Simon Tournier
Subject: Re: streamlining custom package development
Date: Tue, 07 Mar 2023 19:28:25 +0100

Hi,

On Tue, 07 Mar 2023 at 16:57, Przemysław Kamiński <cgenie@pm.me> wrote:

> Starting download of /tmp/guix-file.TykbjO
>  From 
> https://hackage.haskell.org/package/servant-examples/servant-examples-0.1.0.0.tar.gz...
> download failed 
> "https://hackage.haskell.org/package/servant-examples/servant-examples-0.1.0.0.tar.gz";
>  
> 404 "Not Found"

>From <https://hackage.haskell.org/package/servant-examples>, I read,

0.4.2, 0.4.3, 0.4.3.1, 0.4.4, 0.4.4.2, 0.4.4.3, 0.4.4.4, 0.4.4.5, 0.4.4.6, 
0.4.4.7

and 0.1.0.0 is not listed.  For instance, just tweak the Cabal file,

--8<---------------cut here---------------start------------->8---
$ git diff
diff --git a/servant-examples.cabal b/servant-examples.cabal
index f31e2a4..8861cf2 100644
--- a/servant-examples.cabal
+++ b/servant-examples.cabal
@@ -1,5 +1,5 @@
 name:                servant-examples
-version:             0.1.0.0
+version:             0.4.2
 -- synopsis:
 -- description:
 homepage:            https://github.com/githubuser/servant-examples#readme
--8<---------------cut here---------------end--------------->8---

then Guix finds it in the Hackage infrastructure.

--8<---------------cut here---------------start------------->8---
$ cat servant-examples.cabal | guix import hackage -s -r 

Starting download of /tmp/guix-file.yrblu1
>From 
>https://hackage.haskell.org/package/servant-examples/servant-examples-0.4.2.tar.gz...
 …es-0.4.2.tar.gz                              1.7MiB/s 00:00 | 7KiB transferred
Syntax error: unexpected end of input
Syntax error: unexpected end of input
Syntax error: unexpected end of input
Syntax error: unexpected end of input
(define-public ghc-servant-examples
  (package
    (name "ghc-servant-examples")
    (version "0.4.2")
    (source (origin
              (method url-fetch)
              (uri (hackage-uri "servant-examples" version))
              (sha256
               (base32
                "1nmgzkn0nv3p0bzr5ny0yx0g45fzf5qx7s868jp1nq7wbfd3yc0i"))))
    (build-system haskell-build-system)
    (inputs (list ghc-servant
                  ghc-servant-server
                  ghc-servant-swagger
                  ghc-swagger2
                  ghc-wai
                  ghc-aeson
                  ghc-warp))
    (home-page "https://github.com/githubuser/servant-examples#readme";)
    (synopsis "")
    (description "")
    (license license:bsd-3)))
--8<---------------cut here---------------end--------------->8---


> My guess the "Syntax error" is from the missing "ghc-servant-swagger" 
> package.

Hum, I guess is that it comes from the option ’-s’.  For instance,

    guix import hackage servant-examples -r

does not display it.  However, I do not find what is the code that
display “Syntax error”.  Maybe a bug here, indeed.



Cheers,
simon



reply via email to

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