1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pandoc 5, pandocfilters 6, poetry-core 7, pythonOlder 8, substituteAll 9, texliveSmall 10}: 11 12buildPythonPackage rec { 13 pname = "pypandoc"; 14 version = "1.10"; 15 format = "pyproject"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "JessicaTegner"; 21 repo = pname; 22 rev = "v${version}"; 23 hash = "sha256:05m585l4sipjzpkrv4yj5s7w45yxhxlym55lkhnavsshlvisinkz"; 24 }; 25 26 patches = [ 27 (substituteAll { 28 src = ./static-pandoc-path.patch; 29 pandoc = "${lib.getBin pandoc}/bin/pandoc"; 30 pandocVersion = pandoc.version; 31 }) 32 ./skip-tests.patch 33 ]; 34 35 nativeBuildInputs = [ 36 poetry-core 37 ]; 38 39 nativeCheckInputs = [ 40 texliveSmall 41 pandocfilters 42 ]; 43 44 pythonImportsCheck = [ 45 "pypandoc" 46 ]; 47 48 meta = with lib; { 49 description = "Thin wrapper for pandoc"; 50 homepage = "https://github.com/JessicaTegner/pypandoc"; 51 license = licenses.mit; 52 maintainers = with maintainers; [ sternenseemann bennofs ]; 53 }; 54}