On Sat, Dec 12, 2015 at 6:23 AM, Luca Bruno <lethalma...@gmail.com> 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 <ars.ser...@gmail.com> > wrote: > >> 2015-12-12 13:42 GMT+03:00 Freddy Rietdijk <freddyrietd...@fridh.nl>: >> > >>> 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 nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev