about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/mailreaders/afew/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/mailreaders/afew/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/networking/mailreaders/afew/default.nix46
1 files changed, 27 insertions, 19 deletions
diff --git a/nixpkgs/pkgs/applications/networking/mailreaders/afew/default.nix b/nixpkgs/pkgs/applications/networking/mailreaders/afew/default.nix
index c5a07a89c35e..a9becb9d8c90 100644
--- a/nixpkgs/pkgs/applications/networking/mailreaders/afew/default.nix
+++ b/nixpkgs/pkgs/applications/networking/mailreaders/afew/default.nix
@@ -1,40 +1,48 @@
-{ lib, python3Packages, fetchPypi, notmuch }:
+{ lib, python3Packages, fetchPypi, pkgs }:
 
 python3Packages.buildPythonApplication rec {
   pname = "afew";
   version = "3.0.1";
+  pyproject = true;
 
   src = fetchPypi {
     inherit pname version;
     sha256 = "0wpfqbqjlfb9z0hafvdhkm7qw56cr9kfy6n8vb0q42dwlghpz1ff";
   };
 
-  nativeBuildInputs = with python3Packages; [ sphinx setuptools-scm ];
-
-  propagatedBuildInputs = with python3Packages; [
-    python3Packages.setuptools python3Packages.notmuch chardet dkimpy
+  nativeBuildInputs = with python3Packages; [
+    sphinxHook
+    setuptools
+    setuptools-scm
   ];
 
-  nativeCheckInputs = with python3Packages; [
-    freezegun notmuch
+  sphinxBuilders = [
+    "html"
+    "man"
   ];
 
-  makeWrapperArgs = [
-    ''--prefix PATH ':' "${notmuch}/bin"''
+  propagatedBuildInputs = with python3Packages; [
+    chardet
+    dkimpy
+    notmuch
   ];
 
-  outputs = [ "out" "doc" ];
+  nativeCheckInputs = [
+    pkgs.notmuch
+  ] ++ (with python3Packages; [
+    freezegun
+    pytestCheckHook
+  ]);
 
-  postBuild =  ''
-    ${python3Packages.python.pythonOnBuildForHost.interpreter} setup.py build_sphinx -b html,man
-  '';
-
-  postInstall = ''
-    install -D -v -t $out/share/man/man1 build/sphinx/man/*
-    mkdir -p $out/share/doc/afew
-    cp -R build/sphinx/html/* $out/share/doc/afew
-  '';
+  makeWrapperArgs = [
+    ''--prefix PATH ':' "${pkgs.notmuch}/bin"''
+  ];
 
+  outputs = [
+    "out"
+    "doc"
+    "man"
+  ];
 
   meta = with lib; {
     homepage = "https://github.com/afewmail/afew";