guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: Add python-jsbeautifier.


From: guix-commits
Subject: 01/01: gnu: Add python-jsbeautifier.
Date: Thu, 19 Sep 2019 16:46:28 -0400 (EDT)

vagrantc pushed a commit to branch master
in repository guix.

commit 6ec872231fdf746bd6e11b97f8a6b3a23498806c
Author: Vagrant Cascadian <address@hidden>
Date:   Thu Sep 19 13:45:41 2019 -0700

    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.
---
 gnu/packages/diffoscope.scm |  4 ++++
 gnu/packages/python-xyz.scm | 39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+)

diff --git a/gnu/packages/diffoscope.scm b/gnu/packages/diffoscope.scm
index e2b2565..fff331a 100644
--- a/gnu/packages/diffoscope.scm
+++ b/gnu/packages/diffoscope.scm
@@ -93,6 +93,9 @@
                     (add-after 'unpack 'add-known-tools
                       (lambda _
                         (substitute* "diffoscope/external_tools.py"
+                          (("'arch': 'python-jsbeautifier'},")
+                           "'arch': 'python-jsbeautifier', 'guix': 
'python-jsbeautifier'},"))
+                        (substitute* "diffoscope/external_tools.py"
                           (("'arch': 'wabt'},")
                            "'arch': 'wabt', 'guix': 'wabt'},"))))
                     ;; This test is broken because our `file` package has a
@@ -188,6 +191,7 @@
                        ("openssh" ,openssh)
                        ("pgpdump" ,pgpdump)
                        ("poppler" ,poppler)
+                       ("python-jsbeautifier" ,python-jsbeautifier)
                        ("r-minimal" ,r-minimal)
                        ("rpm" ,rpm)
                        ("sng" ,sng)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 44aa471..4e33fa5 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -8035,6 +8035,45 @@ Jupyter kernels such as IJulia and IRKernel.")
 support for rich media output.")
     (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
   (package
     (name "jupyter")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]