unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: Julien Lepiller <julien@lepiller.eu>
Cc: rprior@protonmail.com, 45453@debbugs.gnu.org
Subject: bug#45453: Error when I try to build a package using a JSON definition
Date: Sun, 27 Dec 2020 11:40:58 +0100	[thread overview]
Message-ID: <87im8nmszp.fsf@elephly.net> (raw)
In-Reply-To: <182B84CA-FA45-4184-A462-96B0C28D49BE@lepiller.eu>


Hey Julien,

> I'm surprised guix builds from a json file…

it’s a little known feature.  I added it a long time ago, half in jest,
half in the realization that this removes a common superficial objection
to Guix.

> If not, it could be that the source derivation is not
> fixed-output. After all, the json definition doesn't specify a hash
> (it's not even an origin record). Again I'm confused by the fact that
> guix lets you specify packages with json, so I'm not sure how that
> part is converted to a package object. Is that documented?

Yes, it’s all documented.  The manual has to indexed locations for
“JSON”.  One of them says that you don’t need to specify an origin
record, but you can if you feel like it:

--8<---------------cut here---------------start------------->8---
     The importer also supports a more explicit source definition using
     the common fields for ‘<origin>’ records:

          {
            ...
            "source": {
              "method": "url-fetch",
              "uri": "mirror://gnu/hello/hello-2.10.tar.gz",
              "sha256": {
                "base32": "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i"
              }
            }
            ...
          }
--8<---------------cut here---------------end--------------->8---

-- 
Ricardo




  parent reply	other threads:[~2020-12-27 10:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-27  0:38 bug#45453: Error when I try to build a package using a JSON definition Ryan Prior via Bug reports for GNU Guix
2020-12-27  2:28 ` Julien Lepiller
2020-12-27  3:19   ` Ryan Prior via Bug reports for GNU Guix
2020-12-27 10:40   ` Ricardo Wurmus [this message]
2020-12-27 10:38 ` Ricardo Wurmus
2020-12-27 11:08   ` Ricardo Wurmus

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=87im8nmszp.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=45453@debbugs.gnu.org \
    --cc=julien@lepiller.eu \
    --cc=rprior@protonmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).