Skip to content

Refuse to install pkgs without specified license when allowUnfree = false #43231

Open

Description

@anjefu

Issue description

It appears there are currently over 2500 packages with no meta.license specified. When allowUnfree = false, they seem to still install without issue. I think nix should probably refuse to install them until their license has been specified, to avoid accidentally installing non-free packages.

Activity

  1. added
    0.kind: enhancement
    9.needs: community feedback
    on Jul 10, 2018
  2. xeji commented on Jul 10, 2018

    @xeji
    Contributor

    This would be essentially equivalent to making licenses.unfree the default value for meta.license.

  3. matthewbauer commented on Jul 11, 2018

    @matthewbauer
    Member

    A potential issue with something like that is lots of people use stdenv.mkDerivation for stuff outside of Nixpkgs where they may not be as concerned with licensing. It might be better to make sure everything in Nixpkgs has a license through something like make-tarball.nix (https://github.com/nixos/nixpkgs/blob/master/pkgs/top-level/make-tarball.nix#L77-L97) & make it block the channels. This would also be useful for making sure builtins.parseDrvName works correctly.

  4. LnL7 commented on Jul 17, 2018

    @LnL7
    Member

    This doesn't seem like a good idea, there are lot's of meta packages in nixpkgs like buildEnv which don't have (and probably shouldn't have) license information. Anything unfree in nixpkgs that doesn't have a license specified is a problem and should be fixed.

  5. added 2 commits that reference this issue on Jul 18, 2018
    9ac9244
  6. matthewbauer commented on Jul 24, 2018

    @matthewbauer
    Member

    This doesn't seem like a good idea, there are lot's of meta packages in nixpkgs like buildEnv which don't have (and probably shouldn't have) license information

    I disagree - everything listed in all-packages.nix should have a license. This is what is reported in various tools like nix search, nix-env -qa, and Hydra. It's kind of weird for certain things where there are legitimately multiple licenses but in those cases you can combine them into a list .

  7. LnL7 commented on Jul 24, 2018

    @LnL7
    Member

    I was mostly referring to making nix-env -i fail, since that doesn't make sense in a lot of cases. Something like making checkMeta enforce a license for derivations with a src/srcs makes more sense to me. There are things nix all-packages.nix like setup hooks that are just part of nixpkgs, and only enforcing toplevel attributes still hides other potential problems.

  8. aanderse commented on Feb 9, 2019

    @aanderse
    Member

    @matthewbauer so agreement is that we should just continue to work on getting licenses listed and close this issue?

  9. stale commented on Jun 3, 2020

    @stale

    Thank you for your contributions.

    This has been automatically marked as stale because it has had no activity for 180 days.

    If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

    Here are suggestions that might help resolve this more quickly:

    1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
    2. Ask on the NixOS Discourse.
    3. Ask on the #nixos channel on irc.freenode.net.
  10. added
    2.status: stale
    on Jun 3, 2020
  11. added
    1.severity: legal
    on Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: enhancement1.severity: legal2.status: stale9.needs: community feedback

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions