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

pass arguments to subprocess #10

Open
crabdancing opened this issue Dec 9, 2024 · 1 comment
Open

pass arguments to subprocess #10

crabdancing opened this issue Dec 9, 2024 · 1 comment

Comments

@crabdancing
Copy link

Would be nice to have some way to pass arbitrary (unparsed) arguments to a child process in full.

@jpetrucciani
Copy link
Owner

For sure - I should try to improve this.

Currently as a workaround I'll normally do something like the following (source in my main nix repo):

  nupdate = pog {
    name = "nupdate";
    arguments = [{ name = "attribute"; }];
    description = "my lazy helper function to update an attribute in my nix repo";
    script = ''
      ${prev.nix-update}/bin/nix-update --build --flake --use-update-script "$@"
    '';
  };

Then you can pass through args/flags by ending flags to the pog tool with --:

nupdate -- python312Packages.nicegui --commit

which passes through python312Packages.nicegui --commit to the underlying nix-update command

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