As for an example. Clone this repository https://github.com/sras/servant-examples
Then cd into it and run cat servant-examples.cabal | guix import hackage -s -rThe '-s' option reads from stdin, the '-r' option imports everything recursively.
It throws this output: Starting download of /tmp/guix-file.TykbjOFrom 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"
Starting download of /tmp/guix-file.TykbjOFrom https://web.archive.org/web/20230307175126/https://hackage.haskell.org/package/servant-examples/servant-examples-0.1.0.0.tar.gz... download failed "https://web.archive.org/web/20230307175126/https://hackage.haskell.org/package/servant-examples/servant-examples-0.1.0.0.tar.gz" 404 "NOT FOUND"
Trying to use Disarchive to assemble /tmp/guix-file.TykbjO... could not find its Disarchive specificationfailed to download "/tmp/guix-file.TykbjO" from "https://hackage.haskell.org/package/servant-examples/servant-examples-0.1.0.0.tar.gz"
Syntax error: unexpected end of input
Syntax error: unexpected end of input
(define-public ghc-servant-examples
(package
(name "ghc-servant-examples")
(version "0.1.0.0")
(source (origin
(method url-fetch)
(uri (hackage-uri "servant-examples" version))
(sha256
(base32
"failed to download tar archive"))))
(build-system haskell-build-system)
(properties '((upstream-name . "servant-examples")))
(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)))
My guess the "Syntax error" is from the missing "ghc-servant-swagger"
package.
Also, the source should be changed to (local-file "./" #:recursive? #t) but I guess the stdin option can't guess that. I guess one should add an '-f' option to read the .cabal file.
Anyways, it seems the "-r" option doesn't work here. I was expecting "ghc-servant-swagger" to be defined as well.
P. On 7.03.2023 17:02, Ludovic Courtès wrote:
Hi, Przemysław Kamiński <[email protected]> skribis:3. I run `guix build -L <my-custom-guix-package-dir> -m manifest.scm (manifest only contains a reference to ghc-stuff.scm) 4. I get an error which looks like this: View build log at '/var/log/guix/drvs/j2/wa3vw49l78m85z74x91sklqxwhx87y-ghc-hwodr-0.1.0.drv.bz2' so I fire up bunzip --stdout '/var/log/guix/drvs/j2/wa3vw49l78m85z74x91sklqxwhx87y-ghc-hwodr-0.1.0.drv.bz2' and see that I am missing some Haskell packages.Note that the build log should be just above the “View build log” line if you scroll up a little bit. :-) Otherwise, like Simon said, I’d recommend getting package definitions by running ‘guix import hackage -r’, assuming said packages are on Hackage. That should simplify things. HTH, Ludo’.
OpenPGP_0xF39440D7C4D6E158.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature
publickey - [email protected] - 9cc42b0a.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature
