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

summon: init at 0.8.2 #87969

Merged
merged 2 commits into from Aug 22, 2020
Merged

summon: init at 0.8.2 #87969

merged 2 commits into from Aug 22, 2020

Conversation

QuentinI
Copy link

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Contributor

@tomberek tomberek left a comment

Choose a reason for hiding this comment

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

Seems to have a lot of /usr/local/lib that makes this difficult to use on NixOS.
https://github.com/cyberark/summon/search?q=%2Fusr%2Flocal%2Flib&unscoped_q=%2Fusr%2Flocal%2Flib

@QuentinI
Copy link
Author

@tomberek You can specify path to provider executable via -p flag, e.g. summon -p $(which gopass) in shell or something like summon -p ${pkgs.gopass}/bin/gopass in nix expressions. It would be easier, of course, if you could just write summon -p gopass, but I imagine most people would want to call summon via scripts anyway, so maintaining a patch for that would be quite an overkill IMO.

@stigtsp
Copy link
Member

stigtsp commented May 28, 2020

Hi - thanks for the contribution!

Is it possible to patch it to use $PATH for provider lookups, via /usr/bin/env for instance? I agree that having to provide the path to the provider executable is a bit inconvenient.

Also, the PR contains a separate commit that corrects your githubID in the maintainers. Please provide two commits, one for the new pkg and one for the addition to maintainer-list.

@QuentinI QuentinI force-pushed the summon branch 3 times, most recently from 20b9480 to 5b32dea Compare June 29, 2020 14:50
@QuentinI
Copy link
Author

@stigtsp sorry for the long silence, quarantine disrupted my plans quite a bit. I rebased the commits as you asked and provided an optional patch which tries to resolve non-qualified provider names, i.e. summon -p gopass works now.

pkgs/development/tools/summon/default.nix Outdated Show resolved Hide resolved

subPackages = [ "cmd" ];

patches = optional patchResolver [ ./resolve-paths.patch ];
Copy link
Member

Choose a reason for hiding this comment

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

Does this need to be optional? I'm not sure, what do you think @tomberek
Also it would be nice with a short comment explaining why the patch is there.

Copy link
Author

Choose a reason for hiding this comment

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

My reasoning to make it optional was that it changes the intended behavior of the tool, which may, theoretically, break someone's workflow.

@QuentinI QuentinI changed the title summon: init at 0.8.1 summon: init at 0.8.2 Jun 29, 2020
Copy link
Member

@stigtsp stigtsp left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@Lassulus Lassulus merged commit afde337 into NixOS:master Aug 22, 2020
@QuentinI QuentinI deleted the summon branch August 24, 2020 08:35
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.

None yet

5 participants