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-otp: 1.0.0 -> 1.1.0 #36308

Merged
merged 1 commit into from Mar 4, 2018
Merged

pass-otp: 1.0.0 -> 1.1.0 #36308

merged 1 commit into from Mar 4, 2018

Conversation

tadfisher
Copy link
Contributor

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/)
  • Fits CONTRIBUTING.md.

@@ -5,8 +5,8 @@ stdenv.mkDerivation {
src = fetchFromGitHub {
owner = "tadfisher";
repo = "pass-otp";
rev = "f2feb3082324a91089782af9b7fbb71d34aa213d";
sha256 = "0iklvcfgw1320dggdr02lq3bc7xvnd2934l1w9kkjpbsfmhs955c";
rev = "9edb479405156f5712dd101661b86bd599904e8d";
Copy link
Member

Choose a reason for hiding this comment

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

Please release tags here: v1.1.0: https://github.com/tadfisher/pass-otp/releases

Copy link
Member

Choose a reason for hiding this comment

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

Version should be also part of the name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, thanks!

@Mic92
Copy link
Member

Mic92 commented Mar 4, 2018

@GrahamcOfBorg build pass-otp

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)


post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/34l290mly4wxam276lqky22ljm6ga6qp-pass-otp-1.1.0
gzipping man pages under /nix/store/34l290mly4wxam276lqky22ljm6ga6qp-pass-otp-1.1.0/share/man/
strip is /nix/store/b0zlxla7dmy1iwc3g459rjznx59797xy-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/34l290mly4wxam276lqky22ljm6ga6qp-pass-otp-1.1.0/lib 
patching script interpreter paths in /nix/store/34l290mly4wxam276lqky22ljm6ga6qp-pass-otp-1.1.0
/nix/store/34l290mly4wxam276lqky22ljm6ga6qp-pass-otp-1.1.0/lib/password-store/extensions/otp.bash: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/zqh3l3lyw32q1ayb15bnvg9f24j5v2p0-bash-4.4-p12/bin/bash"
checking for references to /tmp/nix-build-pass-otp-1.1.0.drv-0 in /nix/store/34l290mly4wxam276lqky22ljm6ga6qp-pass-otp-1.1.0...
/nix/store/34l290mly4wxam276lqky22ljm6ga6qp-pass-otp-1.1.0

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Partial log (click to expand)


pass-otp is installed succesfully

post-installation fixup
gzipping man pages under /nix/store/1c871m8j4fssib0z02ykr58qwclnsa6n-pass-otp-1.1.0/share/man/
strip is /nix/store/4sdh09gmvl15cy0zb6i7mbvxh5syz206-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/1c871m8j4fssib0z02ykr58qwclnsa6n-pass-otp-1.1.0/lib
patching script interpreter paths in /nix/store/1c871m8j4fssib0z02ykr58qwclnsa6n-pass-otp-1.1.0
/nix/store/1c871m8j4fssib0z02ykr58qwclnsa6n-pass-otp-1.1.0/lib/password-store/extensions/otp.bash: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/pkjmwq7sqrvjg7cjiph6hq0khsmfl6p8-bash-4.4-p12/bin/bash"
/nix/store/1c871m8j4fssib0z02ykr58qwclnsa6n-pass-otp-1.1.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)


post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/52qiyppnwbs5jb26h4qghvmb9mqgxrfm-pass-otp-1.1.0
gzipping man pages under /nix/store/52qiyppnwbs5jb26h4qghvmb9mqgxrfm-pass-otp-1.1.0/share/man/
strip is /nix/store/lvx1acn1ig1j2km8jds5x3ggh3f2wa8v-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/52qiyppnwbs5jb26h4qghvmb9mqgxrfm-pass-otp-1.1.0/lib
patching script interpreter paths in /nix/store/52qiyppnwbs5jb26h4qghvmb9mqgxrfm-pass-otp-1.1.0
/nix/store/52qiyppnwbs5jb26h4qghvmb9mqgxrfm-pass-otp-1.1.0/lib/password-store/extensions/otp.bash: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/lnws52qanbi5vz8qg24v4ym57nznfndg-bash-4.4-p12/bin/bash"
checking for references to /build in /nix/store/52qiyppnwbs5jb26h4qghvmb9mqgxrfm-pass-otp-1.1.0...
/nix/store/52qiyppnwbs5jb26h4qghvmb9mqgxrfm-pass-otp-1.1.0

@Mic92 Mic92 merged commit 691307e into NixOS:master Mar 4, 2018
@4z3
Copy link
Contributor

4z3 commented Apr 10, 2018

How is this extension supposed to work?

https://github.com/tadfisher/pass-otp says

{
  environment.systemPackages = [ pkgs.pass-otp ];
}

But just adding that line doesn't work (for me) because that won't make the pass executable available. If I add both, pass and pass-otp to environment.systemPackages, then pass won't find the extension (because it's not installed in pass's SYSTEM_EXTENSION_DIR, i.e. ${pkgs.pass}/lib/password-store/extensions.

Maybe pass-otp should be somehow integrated into pass like import, update, and tomb are in https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/security/pass/default.nix. I did it with following hack to achieve that:

--- a/pkgs/tools/security/pass-otp/default.nix
+++ b/pkgs/tools/security/pass-otp/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, pass, fetchFromGitHub, oathToolkit }:
+{ stdenv, fetchFromGitHub, oathToolkit }:
 stdenv.mkDerivation rec {
   name = "pass-otp-${version}";
   version = "1.1.0";
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
     sha256 = "1cgj4zc8fq88n3h6c0vkv9i5al785mdprpgpbv5m22dz9p1wqvbb";
   };
 
-  buildInputs = [ pass oathToolkit ];
+  buildInputs = [ oathToolkit ];
 
   patchPhase = ''
     sed -i -e 's|OATH=\$(which oathtool)|OATH=${oathToolkit}/bin/oathtool|' otp.bash
diff --git a/tv/5pkgs/simple/pass/default.nix b/tv/5pkgs/simple/pass/default.nix
index ad2afa8e..3b692808 100644
--- a/pkgs/tools/security/pass/default.nix
+++ b/pkgs/tools/security/pass/default.nix
@@ -2,6 +2,8 @@
 , coreutils, gnused, getopt, git, tree, gnupg, which, procps, qrencode
 , makeWrapper
 
+, pass-otp
+
 , xclip ? null, xdotool ? null, dmenu ? null
 , x11Support ? !stdenv.isDarwin
 , tombPluginSupport ? false, tomb
@@ -56,6 +58,14 @@ in stdenv.mkDerivation rec {
       popd
     '') plugins)}
 
+    ln -s \
+        ${pass-otp}/lib/password-store/extensions/otp.bash \
+        $out/lib/password-store/extensions/
+
+    ln -s \
+        ${pass-otp}/share/man/man1/pass-otp.1.gz \
+        $out/share/man/man1/
+
     # Install Emacs Mode. NOTE: We can't install the necessary
     # dependencies (s.el and f.el) here. The user has to do this
     # himself.

Alternatively PASSWORD_STORE_EXTENSIONS_DIR could be used.

(This question should probably be an issue at https://github.com/tadfisher/pass-otp, but then the above diff wouldn't make sense.)

@tadfisher
Copy link
Contributor Author

@4z3 see #39121

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

4 participants