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