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

Standardize makeWrapperArgs #7

Open
jonringer opened this issue Nov 5, 2024 · 3 comments
Open

Standardize makeWrapperArgs #7

jonringer opened this issue Nov 5, 2024 · 3 comments

Comments

@jonringer
Copy link
Contributor

A lot of "buildX" helpers can wrap programs, we should standardize this so they can be used in more normalized ways.

@nrdxp
Copy link
Member

nrdxp commented Nov 6, 2024

are you talking specifically about the args passed to the make wrapper function, or the wrappers themselves?

@jonringer
Copy link
Contributor Author

I guess I want makeWrapper/makeShellWrapper to respect makeWrapperArgs, so python's and gApps' wrappers don't really need to do anything special. Similarly, we could replace:

postInstall = ''
  wrapProgram $out/bin/foo \
    --prefix PATH : ${lib.getBin bar}/bin/bar \
    --set SOME_FLAG 1 \
'';

with:

postInstall = ''
  wrapProgram $out/bin/foo
'';
makeWrapperArgs = [
  "--prefix PATH : ${lib.getBin bar}/bin/bar"
  "-set SOME_FLAG 1"
];

@jonringer
Copy link
Contributor Author

Similarly, if gappsWrapperArgs just appended values to makeWrapperArgs, then we wouldn't need:

  makeWrapperArgs+=("''${gappsWrapperArgs[@]}")

https://github.com/NixOS/nixpkgs/blob/3f1ae27cc56a7535a494dbd47ef97e4fb3102762/pkgs/games/gshogi/default.nix#L36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants