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

librewolf: add meta.mainProgram attribute #267330

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

Guanran928
Copy link
Contributor

Description of changes

add meta.mainProgram attribute
it might or might not work

nixpkgs on  librewolf-mainprogram > nix build .#librewolf
nixpkgs on  librewolf-mainprogram took 12s > ./result/bin/librewolf

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/)
  • 23.11 Release Notes (or backporting 23.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.

@NixOSInfra NixOSInfra added the 12. first-time contribution This PR is the author's first one; please be gentle! label Nov 13, 2023
@mattmelling
Copy link
Contributor

librewolf will already run from nix run nixpkgs#librewolf. See nix run documentation.

@Guanran928
Copy link
Contributor Author

librewolf will already run from nix run nixpkgs#librewolf. See nix run documentation.

I got this warning while trying to use LibreWolf with nixpak

building the system configuration...
warning: Git tree '/home/guanranwang/Documents/Projects/git-repos/github.com/Guanran928/flake' is dirty
trace: warning: getExe: Package "librewolf-unwrapped-119.0-5" does not have the meta.mainProgram attribute. We'll assume that the main program has the same name for now, but this behavior is deprecated, because it leads to surprising errors when the assumption does not hold. If the package has a main program, please set `meta.mainProgram` in its definition to make this warning go away. Otherwise, if the package does not have a main program, or if you don't control its definition, use getExe' to specify the name to the program, such as lib.getExe' foo "bar".

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Nov 14, 2023
Copy link
Contributor

@MikaelFangel MikaelFangel left a comment

Choose a reason for hiding this comment

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

LGTM

@MikaelFangel MikaelFangel added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Nov 14, 2023
@MikaelFangel
Copy link
Contributor

@mattmelling I think that the documentation on nix run is a bit outdated because the assumption that pname and mainProgram is the same has been deprecated as can be seen in @Guanran928 warning message. (It can be found on line 149 in meta.nix last time I checked) ☺️

@delroth delroth added 12.approvals: 2 This PR was reviewed and approved by two reputable people and removed 12.approvals: 1 This PR was reviewed and approved by one reputable person labels Nov 14, 2023
@mattmelling
Copy link
Contributor

@mattmelling I think that the documentation on nix run is a bit outdated because the assumption that pname and mainProgram is the same has been deprecated

Thanks, TIL!

@Artturin Artturin merged commit 5d11cc7 into NixOS:master Nov 16, 2023
10 checks passed
@Guanran928 Guanran928 deleted the librewolf-mainprogram branch December 9, 2023 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux 12.approvals: 2 This PR was reviewed and approved by two reputable people 12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants