From da2a5558ab0416ba1c2ddb1c454cdcfc3c05af60 Mon Sep 17 00:00:00 2001 From: Rien Maertens Date: Tue, 22 Mar 2022 11:20:58 +0100 Subject: [PATCH] alot: fix ModuleNotFoundError of '_notmuch_config' --- pkgs/applications/networking/mailreaders/alot/notmuch.nix | 6 ++++++ .../networking/mailreaders/notmuch/default.nix | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/mailreaders/alot/notmuch.nix b/pkgs/applications/networking/mailreaders/alot/notmuch.nix index bd195b52d44e..5d74270a58c2 100644 --- a/pkgs/applications/networking/mailreaders/alot/notmuch.nix +++ b/pkgs/applications/networking/mailreaders/alot/notmuch.nix @@ -14,6 +14,12 @@ buildPythonPackage { buildInputs = [ python notmuch cffi ]; + # since notmuch 0.35, this package expects _notmuch_config.py that is + # generated by notmuch's configure script + postPatch = '' + cp ${notmuch.bindingconfig}/_notmuch_config.py . + ''; + # no tests doCheck = false; pythonImportsCheck = [ "notmuch2" ]; diff --git a/pkgs/applications/networking/mailreaders/notmuch/default.nix b/pkgs/applications/networking/mailreaders/notmuch/default.nix index 184804a87888..e89216802e50 100644 --- a/pkgs/applications/networking/mailreaders/notmuch/default.nix +++ b/pkgs/applications/networking/mailreaders/notmuch/default.nix @@ -62,7 +62,12 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; makeFlags = [ "V=1" ]; - outputs = [ "out" "man" "info" ] + postConfigure = '' + mkdir ${placeholder "bindingconfig"} + cp bindings/python-cffi/_notmuch_config.py ${placeholder "bindingconfig"}/ + ''; + + outputs = [ "out" "man" "info" "bindingconfig" ] ++ lib.optional withEmacs "emacs" ++ lib.optional withRuby "ruby";