summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthieu Coudron <teto@users.noreply.github.com>2022-03-25 16:35:55 +0100
committerGitHub <noreply@github.com>2022-03-25 16:35:55 +0100
commitb861f07f8203abd3702281eda6fb7f264200fc49 (patch)
treeeab15aba14214408aab7a3ab325e94413de6281b
parent0e0bb200ff2028432d56f710213873f7dd3d345b (diff)
parent3d635629bece87df5088b3dc698b5dc6fe494cf0 (diff)
downloadnixpkgs-b861f07f8203abd3702281eda6fb7f264200fc49.tar
nixpkgs-b861f07f8203abd3702281eda6fb7f264200fc49.tar.gz
nixpkgs-b861f07f8203abd3702281eda6fb7f264200fc49.tar.bz2
nixpkgs-b861f07f8203abd3702281eda6fb7f264200fc49.tar.lz
nixpkgs-b861f07f8203abd3702281eda6fb7f264200fc49.tar.xz
nixpkgs-b861f07f8203abd3702281eda6fb7f264200fc49.tar.zst
nixpkgs-b861f07f8203abd3702281eda6fb7f264200fc49.zip
Merge pull request #165255 from rien/master
-rw-r--r--pkgs/applications/networking/mailreaders/alot/default.nix8
-rw-r--r--pkgs/applications/networking/mailreaders/notmuch/default.nix7
-rw-r--r--pkgs/development/python-modules/notmuch2/default.nix (renamed from pkgs/applications/networking/mailreaders/alot/notmuch.nix)6
-rw-r--r--pkgs/top-level/python-packages.nix4
4 files changed, 17 insertions, 8 deletions
diff --git a/pkgs/applications/networking/mailreaders/alot/default.nix b/pkgs/applications/networking/mailreaders/alot/default.nix
index 3d09711fb3c..cb49829dce0 100644
--- a/pkgs/applications/networking/mailreaders/alot/default.nix
+++ b/pkgs/applications/networking/mailreaders/alot/default.nix
@@ -9,13 +9,7 @@
 , withManpage ? false
 }:
 
-with python3.pkgs;
-let
-  notmuch2 = callPackage ./notmuch.nix {
-    inherit notmuch;
-  };
-in
-buildPythonApplication rec {
+with python3.pkgs; buildPythonApplication rec {
   pname = "alot";
   version = "0.10";
 
diff --git a/pkgs/applications/networking/mailreaders/notmuch/default.nix b/pkgs/applications/networking/mailreaders/notmuch/default.nix
index 184804a8788..e89216802e5 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";
 
diff --git a/pkgs/applications/networking/mailreaders/alot/notmuch.nix b/pkgs/development/python-modules/notmuch2/default.nix
index bd195b52d44..5d74270a58c 100644
--- a/pkgs/applications/networking/mailreaders/alot/notmuch.nix
+++ b/pkgs/development/python-modules/notmuch2/default.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/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index eaead6df5e1..b3bb64ad8f2 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -5617,6 +5617,10 @@ in {
     inherit (pkgs) notmuch;
   };
 
+  notmuch2 = callPackage ../development/python-modules/notmuch2 {
+    inherit (pkgs) notmuch;
+  };
+
   nototools = callPackage ../data/fonts/noto-fonts/tools.nix { };
 
   notus-scanner = callPackage ../development/python-modules/notus-scanner { };