wlroots: 0.18.1 -> 0.18.2 (#364488)
[NixPkgs.git] / pkgs / development / python-modules / draftjs-exporter / default.nix
blob0573af0c60a3b6b5e523f28b6573334217a1c323
2   beautifulsoup4,
3   buildPythonPackage,
4   fetchFromGitHub,
5   html5lib,
6   lib,
7   lxml,
8   python,
9 }:
11 buildPythonPackage rec {
12   pname = "draftjs-exporter";
13   version = "5.0.0";
14   format = "setuptools";
16   src = fetchFromGitHub {
17     repo = "draftjs_exporter";
18     owner = "springload";
19     rev = "refs/tags/v${version}";
20     sha256 = "sha256-4MmCVRx350p6N9XqTZSo8ROI/OJ0s4aKSYH9+Oxgvf4=";
21   };
23   optional-dependencies = {
24     lxml = [ lxml ];
25     html5lib = [
26       beautifulsoup4
27       html5lib
28     ];
29   };
31   checkInputs = optional-dependencies.lxml ++ optional-dependencies.html5lib;
33   checkPhase = ''
34     # 2 tests in this file randomly fail because they depend on the order of
35     # HTML attributes
36     rm tests/test_exports.py
38     ${python.interpreter} -m unittest discover
39   '';
41   pythonImportsCheck = [ "draftjs_exporter" ];
43   meta = with lib; {
44     description = "Library to convert Draft.js ContentState to HTML";
45     homepage = "https://github.com/springload/draftjs_exporter";
46     changelog = "https://github.com/springload/draftjs_exporter/blob/v${version}/CHANGELOG.md";
47     license = licenses.mit;
48     maintainers = with maintainers; [ sephi ];
49   };