On Sat, Dec 12, 2015 at 6:23 AM, Luca Bruno <[email protected]> wrote:
> I think that code is so simple that with a small transformation it's json,
> without using libnix.
>
Nix itself does an easy transformation:
nix-instantiate --eval --strict --json ./lib/licenses.nix
It is a bit verbose though, we could make it shorter:
{"afl21":{"fullName":"Academic Free License","spdxId":"AFL-2.1"},
"amazonsl":{"free":false,"fullName":"Amazon Software License","url":"
http://aws.amazon.com/asl/"}}
Other than the quoted names it seems reasonable.
> On Sat, Dec 12, 2015 at 11:52 AM, Arseniy Seroka <[email protected]>
> wrote:
>
>> 2015-12-12 13:42 GMT+03:00 Freddy Rietdijk <[email protected]>:
>>
>
>>> A practical use case is that I would like to match (using Python) raw
>>> license information to the licenses we have in nixpkgs.
>>>
>> Why not have a big hardcoded table, like in cabal2nix?
https://github.com/NixOS/cabal2nix/blob/master/distribution-nixpkgs/src/Distribution/Nixpkgs/Haskell/FromCabal/License.hs
Then you would not need Nixpkgs's license list at all, except for reference.
-- Mathnerd314
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev