afew: fix build, use sphinxHook, use pep517 build

authored by

Martin Weinelt and committed by
Kerstin
ab3c49d8 8e2ed1cc

+27 -19
+27 -19
pkgs/applications/networking/mailreaders/afew/default.nix
··· 1 - { lib, python3Packages, fetchPypi, notmuch }: 1 + { lib, python3Packages, fetchPypi, pkgs }: 2 2 3 3 python3Packages.buildPythonApplication rec { 4 4 pname = "afew"; 5 5 version = "3.0.1"; 6 + pyproject = true; 6 7 7 8 src = fetchPypi { 8 9 inherit pname version; 9 10 sha256 = "0wpfqbqjlfb9z0hafvdhkm7qw56cr9kfy6n8vb0q42dwlghpz1ff"; 10 11 }; 11 12 12 - nativeBuildInputs = with python3Packages; [ sphinx setuptools-scm ]; 13 - 14 - propagatedBuildInputs = with python3Packages; [ 15 - python3Packages.setuptools python3Packages.notmuch chardet dkimpy 13 + nativeBuildInputs = with python3Packages; [ 14 + sphinxHook 15 + setuptools 16 + setuptools-scm 16 17 ]; 17 18 18 - nativeCheckInputs = with python3Packages; [ 19 - freezegun notmuch 19 + sphinxBuilders = [ 20 + "html" 21 + "man" 20 22 ]; 21 23 22 - makeWrapperArgs = [ 23 - ''--prefix PATH ':' "${notmuch}/bin"'' 24 + propagatedBuildInputs = with python3Packages; [ 25 + chardet 26 + dkimpy 27 + notmuch 24 28 ]; 25 29 26 - outputs = [ "out" "doc" ]; 30 + nativeCheckInputs = [ 31 + pkgs.notmuch 32 + ] ++ (with python3Packages; [ 33 + freezegun 34 + pytestCheckHook 35 + ]); 27 36 28 - postBuild = '' 29 - ${python3Packages.python.pythonOnBuildForHost.interpreter} setup.py build_sphinx -b html,man 30 - ''; 37 + makeWrapperArgs = [ 38 + ''--prefix PATH ':' "${pkgs.notmuch}/bin"'' 39 + ]; 31 40 32 - postInstall = '' 33 - install -D -v -t $out/share/man/man1 build/sphinx/man/* 34 - mkdir -p $out/share/doc/afew 35 - cp -R build/sphinx/html/* $out/share/doc/afew 36 - ''; 37 - 41 + outputs = [ 42 + "out" 43 + "doc" 44 + "man" 45 + ]; 38 46 39 47 meta = with lib; { 40 48 homepage = "https://github.com/afewmail/afew";