1{ lib, fetchPypi, buildPythonApplication, EditorConfig, fetchpatch, pytest, six }:
2
3buildPythonApplication rec {
4 pname = "jsbeautifier";
5 version = "1.9.1";
6
7 propagatedBuildInputs = [ six EditorConfig ];
8 checkInputs = [ pytest ];
9
10 src = fetchPypi {
11 inherit pname version;
12 sha256 = "0q8ld072dkccssagjxyvc9633fb6ynflvz70924phgp3zxmim960";
13 };
14
15 patches = [
16 (fetchpatch {
17 url = "https://github.com/beautify-web/js-beautify/commit/78e35a11cbb805fc044241d6465800ee2bd57ebc.patch";
18 sha256 = "1ah7nshk96yljy37i20v4fga834dix9cdbhkdc3flfm4904n4523";
19 })
20 ];
21
22 patchFlags = [ "-p2" ];
23
24 meta = with lib; {
25 homepage = "http://jsbeautifier.org";
26 description = "JavaScript unobfuscator and beautifier.";
27 license = licenses.mit;
28 maintainers = with maintainers; [ apeyroux ];
29 };
30}