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

krunner-pass: init at version v1.3.0 #37494

Merged
merged 1 commit into from Apr 3, 2018
Merged

Conversation

ysndr
Copy link
Member

@ysndr ysndr commented Mar 20, 2018

Motivation for this change

accessing passwords through krunner

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • [ x] Fits CONTRIBUTING.md.

P.S. I'm not entirely sure if I located this at the right place.. I'm very open for comments as this is also my first commit to nixpkgs :)

fetchFromGitHub,
cmake, extra-cmake-modules, gnumake,

pass, pass-otp ? null, krunner,
Copy link
Member

Choose a reason for hiding this comment

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

Why pass-otp is optional? It seems to me this is not necessary

Copy link
Member Author

Choose a reason for hiding this comment

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

Judging by it's readme it can optionally be used with pass-otp hence the optional dependency.

Copy link
Member

Choose a reason for hiding this comment

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

ok, fine.

}:
let
pname = "krunner-pass";
version = "v1.3.0";
Copy link
Member

Choose a reason for hiding this comment

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

The version in the package name should only contain digits (nixpkgs coding conventions).

src = fetchFromGitHub {
owner = "akermu";
repo = "krunner-pass";
rev = "a541cf126689fa27665248aa1d7f934fc551a0c7";
Copy link
Member

Choose a reason for hiding this comment

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

You can use the version number as a git tag.

sha256 = "032fs2174ls545kjixbhzyd65wgxkw4s5vg8b20irc5c9ak3pxm0";
};

propagatedBuildInputs = [
Copy link
Member

Choose a reason for hiding this comment

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

These build inputs should not need to be propagated.
Please change propagatedBuildInputs to buildInputs.

src = fetchFromGitHub {
owner = "akermu";
repo = "krunner-pass";
rev = "v1.3.0";
Copy link
Member

Choose a reason for hiding this comment

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

rev = "v1.3.0"; -> rev = "v${version}";

@adisbladis
Copy link
Member

I see that krunner-pass is calling pass as a subprocess https://github.com/akermu/krunner-pass/blob/a541cf126689fa27665248aa1d7f934fc551a0c7/pass.cpp#L196.
krunner-pass needs to be patched to point to the nix store path.

A simple example of how it should be done can be found here.

@nlewo
Copy link
Member

nlewo commented Mar 26, 2018

@adisbladis It is the recommended way? Because It would be more robust (not source code dependent) to set the PATH with makeWrapper.

@adisbladis
Copy link
Member

@nlewo It depends :) In this case there are no binaries expected to be invoked by a user in the output, there are only some shared objects that are loaded by krunner so the makeWrapper approach wouldn't work.

@nlewo
Copy link
Member

nlewo commented Mar 26, 2018

@adisbladis ah yes, I didn't see no binaries are produced, sorry.

@ysndr
Copy link
Member Author

ysndr commented Mar 26, 2018

applied requested changes, hope that I did the patch alright.

@adisbladis
Copy link
Member

adisbladis commented Apr 3, 2018

@ysndr Things are looking good now except that commits should be squashed an have a commit message like krunner-pass: init at 1.3.0.

I'm also not clear on how this is supposed to be used. How does krunner know where to look for the plugin?
Do you have any pointers @ttuegel?

@ttuegel
Copy link
Member

ttuegel commented Apr 3, 2018

How does krunner know where to look for the plugin?

krunner looks for a .desktop file that should be provided by the plugin. If this plugin provides a correct one, it should be enough to install it into the system profile and run kbuildsycoca5.

@adisbladis adisbladis merged commit 0c95dee into NixOS:master Apr 3, 2018
@adisbladis
Copy link
Member

@ysndr Thanks for your first contribution to nixpkgs! 🥇

@ttuegel Works fine. Thanks!

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

6 participants