From 089404358dd94d89da6fcbbcc8b15de9b2171327 Mon Sep 17 00:00:00 2001 From: Jonas Hoersch Date: Sat, 20 Apr 2013 17:02:00 +0200 Subject: [PATCH] notmuch: patch source to use full path of gpg2 gets rid of the dependency on the old gnupg1. and enables decryption even if the gpg binary is not in the users environment. warning: i don't know whether the switch from gnupg1 to gnupg introduces any incompatibilities. this is a works for me patch. --- .../networking/mailreaders/notmuch/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/mailreaders/notmuch/default.nix b/pkgs/applications/networking/mailreaders/notmuch/default.nix index 1477cd82cf44..ebab3a42af67 100644 --- a/pkgs/applications/networking/mailreaders/notmuch/default.nix +++ b/pkgs/applications/networking/mailreaders/notmuch/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv, bash, emacs, gdb, glib, gmime, gnupg1, +{ fetchurl, stdenv, bash, emacs, gdb, glib, gmime, gnupg, pkgconfig, talloc, xapian }: @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { sha256 = "03cwylm0y9xld0hn753v0hn62f96nagdmzxv8jlz8vdbh9iszs56"; }; - buildInputs = [ bash emacs gdb glib gmime gnupg1 pkgconfig talloc xapian ]; + buildInputs = [ bash emacs gdb glib gmime gnupg pkgconfig talloc xapian ]; patchPhase = '' (cd test && for prg in \ @@ -55,6 +55,14 @@ stdenv.mkDerivation rec { substituteInPlace "$prg" \ --replace "#!/usr/bin/env bash" "#!${bash}/bin/bash" done) + + for src in \ + crypto.c \ + emacs/notmuch-crypto.el + do + substituteInPlace "$src" \ + --replace \"gpg\" \"${gnupg}/bin/gpg2\" + done ''; # XXX: emacs tests broken