Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iptables: add meta.mainProgram #339332

Closed
wants to merge 2 commits into from

Conversation

poperigby
Copy link
Contributor

Description of changes

I added the meta.mainProgram attribute, and reformatted the file with nixfmt-rfc-style

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

Copy link
Contributor

@eclairevoyant eclairevoyant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's like 40 different binaries in iptables, I don't think it makes sense to set it, especially since there's ip6tables as well.

@poperigby
Copy link
Contributor Author

@eclairevoyant that's fair, but I also think that the most used program is absolutely going to be iptables, and isn't that what meta.mainProgram is for? It also doesn't really hurt to add it, as people can just specify the path to the binary they want if it isn't iptables, and it makes it easier for people making scripts to be able to use lib.getExe.

@eclairevoyant
Copy link
Contributor

I also think that the most used program is absolutely going to be iptables,

I'd say a highly common usecase would be to also use ip6tables.

people can just specify the path to the binary they want if it isn't iptables, and it makes it easier for people making scripts to be able to use lib.getExe.

They can use lib.getExe' pkgs.iptables "iptables" already

@poperigby
Copy link
Contributor Author

poperigby commented Sep 4, 2024

I'd say a highly common usecase would be to also use ip6tables.

I really don't think people are using an IPv6 utility nearly as much as an IPv4 one, but I don't care that much, so I'll just close this.

@poperigby poperigby closed this Sep 4, 2024
@poperigby poperigby deleted the iptables-mainprogram branch September 4, 2024 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants