summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Hoeg <peter@speartail.com>2017-02-18 18:32:35 +0800
committerPeter Hoeg <peter@speartail.com>2017-02-20 08:09:44 +0800
commit9ca3caeb09f4bbc0710a1a8a9cb05e3f4a84ec2e (patch)
tree4a47278616bd71b0259cd7ad6b74ef7da20f1319
parenta9584c9510771f96594b4461e9ea546a75bf59d4 (diff)
downloadnixlib-9ca3caeb09f4bbc0710a1a8a9cb05e3f4a84ec2e.tar
nixlib-9ca3caeb09f4bbc0710a1a8a9cb05e3f4a84ec2e.tar.gz
nixlib-9ca3caeb09f4bbc0710a1a8a9cb05e3f4a84ec2e.tar.bz2
nixlib-9ca3caeb09f4bbc0710a1a8a9cb05e3f4a84ec2e.tar.lz
nixlib-9ca3caeb09f4bbc0710a1a8a9cb05e3f4a84ec2e.tar.xz
nixlib-9ca3caeb09f4bbc0710a1a8a9cb05e3f4a84ec2e.tar.zst
nixlib-9ca3caeb09f4bbc0710a1a8a9cb05e3f4a84ec2e.zip
gnupg: include systemd user units in output
-rw-r--r--pkgs/tools/security/gnupg/21.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkgs/tools/security/gnupg/21.nix b/pkgs/tools/security/gnupg/21.nix
index e40d1f7bf019..a301cf0c5690 100644
--- a/pkgs/tools/security/gnupg/21.nix
+++ b/pkgs/tools/security/gnupg/21.nix
@@ -37,6 +37,14 @@ stdenv.mkDerivation rec {
   pinentryBinaryPath = pinentry.binaryPath or "bin/pinentry";
   configureFlags = optional guiSupport "--with-pinentry-pgm=${pinentry}/${pinentryBinaryPath}";
 
+  postInstall = ''
+    mkdir -p $out/lib/systemd/user
+    for f in doc/examples/systemd-user/*.{service,socket} ; do
+      substitute $f $out/lib/systemd/user/$(basename $f) \
+        --replace /usr/bin $out/bin
+    done
+  '';
+
   meta = with stdenv.lib; {
     homepage = http://gnupg.org;
     description = "A complete and free implementation of the OpenPGP standard";