GNU bug report logs -
#40629
Build and install packages from JSON definitions
Previous Next
Reported by: Ricardo Wurmus <rekado <at> elephly.net>
Date: Tue, 14 Apr 2020 16:45:01 UTC
Severity: normal
Done: Ricardo Wurmus <rekado <at> elephly.net>
Bug is archived. No further changes may be made.
Full log
Message #67 received at 40629 <at> debbugs.gnu.org (full text, mbox):
Ludovic Courtès <ludo <at> gnu.org> writes:
>> Well, fret not! This patch set adds support for JSON package
>> definitions to “guix package -f” and “guix build -f”. You can now dump
>> this into a file “hello.json”:
>>
>> {
>> "name": "hello",
>> "version": "2.10",
>> "source": "mirror://gnu/hello/hello-2.10.tar.gz",
>> "build-system": "gnu",
>> "home-page": "https://www.gnu.org/software/hello/",
>> "synopsis": "Hello, GNU world: An example GNU package",
>> "description": "GNU Hello prints a greeting.",
>> "license": "GPL-3.0+",
>> "native-inputs": ["gettext"]
>> }
>>
>> and then install the hello package with “guix package -f hello.json”
>> without having to first run the JSON importer.
>
> I think that’s pretty cool!
>
> In a way, it also looks like a special case of the import-on-the-fly use
> case we discussed. Namely, if you could write:
>
> guix build json:./foo.json
> guix install pypi:itsdangerous
> …
>
> and have the relevant importer automatically invoked, that’d be sweet.
Yes, that was the original goal that motivated writing alist->package
(instead of making this specific to JSON). I remember vaguely that I
ran into an obstacle back then. I think this may have predated the
existence of recursive importers, which meant that I couldn’t generate
package objects for packages that had as yet unpackaged inputs.
Perhaps this is no longer a problem and we could take a stab at these
on-the-fly imports. Infinite packages! :)
--
Ricardo
This bug report was last modified 5 years and 120 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.