From 10e18e2b8d96d2742d070a652ee2aa656e8b0780 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 23 Sep 2016 15:55:43 +0200 Subject: Revert "move scripting to own derivation" This reverts commit a17c9c5dcb9c958683ab571ec1261ce459217569. --- users/gkleen@hel.nix | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/users/gkleen@hel.nix b/users/gkleen@hel.nix index fb65e343..fa4989e2 100644 --- a/users/gkleen@hel.nix +++ b/users/gkleen@hel.nix @@ -10,18 +10,16 @@ ''; }; gnupg = pkgs.lib.overrideDerivation pkgs.gnupg (oldAttrs: { + buildInputs = [ pkgs.makeWrapper ]; + postBuild = '' + wrapProgram $out/bin/gpg \ + --run "while ! systemctl --user show-environment | grep -qE '^DISPLAY='; do sleep 1; done" \ + --run "systemctl --user import-environment DISPLAY" + ''; postInstall = '' ln -s $out/bin/gpg2 $out/bin/gpg ''; }); - gnupg-script = with pkgs; writeScript "gnupg-script" '' - #!${stdenv.shell} - - while ! systemctl --user show-environment | grep -qE '^DISPLAY='; do sleep 1; done - - systemctl --user import-environment DISPLAY - exec ${gnupg}/bin/gpg2 --daemon - ''; } // (import ../utils/nix/default.nix) {}; allowUnfree = true; -- cgit v1.2.3