From: "Przemysław Kamiński" <cgenie@pm.me>
To: "help-guix@gnu.org" <help-guix@gnu.org>
Subject: Re: streamlining custom package development
Date: Tue, 07 Mar 2023 16:57:32 +0000 [thread overview]
Message-ID: <06abebe3-1b27-881a-ce7e-7cdc4a725d6b@pm.me> (raw)
In-Reply-To: <87jzzsbldz.fsf@gnu.org>
[-- Attachment #1.1.1.1.1: Type: text/plain, Size: 3363 bytes --]
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 -r
The '-s' option reads from stdin, the '-r' option imports everything
recursively.
It throws this output:
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"
Starting download of /tmp/guix-file.TykbjO
From
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 specification
failed 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 <cgenie@pm.me> 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’.
[-- Attachment #1.1.1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 1227 bytes --]
[-- Attachment #1.1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
[-- Attachment #1.2: publickey - cgenie@pm.me - 9cc42b0a.asc --]
[-- Type: application/pgp-keys, Size: 681 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]
next prev parent reply other threads:[~2023-03-07 16:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-03 10:44 streamlining custom package development Przemysław Kamiński
2023-03-03 11:05 ` Marek Paśnikowski
2023-03-07 13:31 ` Simon Tournier
2023-03-07 16:02 ` Ludovic Courtès
2023-03-07 16:57 ` Przemysław Kamiński [this message]
2023-03-07 18:28 ` Simon Tournier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=06abebe3-1b27-881a-ce7e-7cdc4a725d6b@pm.me \
--to=cgenie@pm.me \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).