gnu: Add python-jsbeautifier.

* gnu/packages/python-xyz (python-jsbeautifier): New variable.
* gnu/packages/diffoscope (diffoscope)[native-arguments]: Add python-jsbeautifier.
  [arguments]: Add python-jsbeautifier to add-known-tools phase.
This commit is contained in:
Vagrant Cascadian 2019-09-19 13:45:41 -07:00 committed by Vagrant Cascadian
parent af760990e9
commit 6ec872231f
No known key found for this signature in database
GPG Key ID: DC518FC87F9716AA
2 changed files with 43 additions and 0 deletions

View File

@ -92,6 +92,9 @@
;; Patch in support for known tools ;; Patch in support for known tools
(add-after 'unpack 'add-known-tools (add-after 'unpack 'add-known-tools
(lambda _ (lambda _
(substitute* "diffoscope/external_tools.py"
(("'arch': 'python-jsbeautifier'},")
"'arch': 'python-jsbeautifier', 'guix': 'python-jsbeautifier'},"))
(substitute* "diffoscope/external_tools.py" (substitute* "diffoscope/external_tools.py"
(("'arch': 'wabt'},") (("'arch': 'wabt'},")
"'arch': 'wabt', 'guix': 'wabt'},")))) "'arch': 'wabt', 'guix': 'wabt'},"))))
@ -188,6 +191,7 @@
("openssh" ,openssh) ("openssh" ,openssh)
("pgpdump" ,pgpdump) ("pgpdump" ,pgpdump)
("poppler" ,poppler) ("poppler" ,poppler)
("python-jsbeautifier" ,python-jsbeautifier)
("r-minimal" ,r-minimal) ("r-minimal" ,r-minimal)
("rpm" ,rpm) ("rpm" ,rpm)
("sng" ,sng) ("sng" ,sng)

View File

@ -8035,6 +8035,45 @@ Jupyter kernels such as IJulia and IRKernel.")
support for rich media output.") support for rich media output.")
(license license:bsd-3))) (license license:bsd-3)))
(define-public python-jsbeautifier
(package
(name "python-jsbeautifier")
(version "1.10.2")
(home-page "https://github.com/beautify-web/js-beautify")
(source (origin
(method git-fetch)
(uri (git-reference
(url home-page)
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
(build-system python-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
(add-after 'unpack 'chdir
(lambda _
;; The upstream Git repository contains all the code,
;; but this package only builds the python code.
(chdir "python")
#t))
(add-after 'unpack 'patch-python-six-requirements
(lambda _
(substitute* "python/setup.py"
(("six>=1.12.0")
"six>=1.11.0"))
#t)))))
(propagated-inputs
`(("python-editorconfig" ,python-editorconfig)
("python-six" ,python-six)))
(native-inputs
`(("python-pytest" ,python-pytest)))
(synopsis "JavaScript unobfuscator and beautifier")
(description "Beautify, unpack or deobfuscate JavaScript, leveraging
popular online obfuscators.")
(license license:expat)))
(define-public jupyter (define-public jupyter
(package (package
(name "jupyter") (name "jupyter")