depot/third_party/nixpkgs/pkgs/development/python-modules/pypandoc/default.nix
Default email c7cb07f092 Project import generated by Copybara.
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
2024-02-29 21:09:43 +01:00

54 lines
1,019 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pandoc
, pandocfilters
, poetry-core
, pythonOlder
, substituteAll
, texliveSmall
}:
buildPythonPackage rec {
pname = "pypandoc";
version = "1.13";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "JessicaTegner";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-9fpits8O/50maM/e1lVVqBoTwUmcI+/IAYhVX1Pt6ZE=";
};
patches = [
(substituteAll {
src = ./static-pandoc-path.patch;
pandoc = "${lib.getBin pandoc}/bin/pandoc";
pandocVersion = pandoc.version;
})
./skip-tests.patch
];
nativeBuildInputs = [
poetry-core
];
nativeCheckInputs = [
texliveSmall
pandocfilters
];
pythonImportsCheck = [
"pypandoc"
];
meta = with lib; {
description = "Thin wrapper for pandoc";
homepage = "https://github.com/JessicaTegner/pypandoc";
license = licenses.mit;
maintainers = with maintainers; [ sternenseemann bennofs ];
};
}