input-output-hk / haskell.nix

Alternative Haskell Infrastructure for Nixpkgs
https://input-output-hk.github.io/haskell.nix
Apache License 2.0
551 stars 237 forks source link

Entire `license` in package derivations. #2126

Open Rosuavio opened 9 months ago

Rosuavio commented 9 months ago

Is your feature request related to a problem? Please describe. Working on automatically creating containers from cabal exe's (https://github.com/input-output-hk/iogx/pull/26), and I want to provide the same license information specified in the cabal file to container's license meta data. The cabal exe allows the user to specify an SPDX License Expression and the container allows SPDX License Expressions. I want the be able to put the same expression from the cabal file into the container.

While haskell.nix does parse the license expression, as far as I know its only stored in meta.licenses as a list of license. That list does not preserve the relations between the licenses used (WITH, AND, OR) so the original string from the cabal file is unrecoverable from content from meta.licenses.

Describe the solution you'd like And extra attribute somewhere in the package with the entire original string.

Describe alternatives you've considered Change nixpkgs to allow entire SPDX license expressions in meta somewhere or something isomorphic to SPDX license expressions.

stale[bot] commented 5 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.