unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add uwsgi.
@ 2016-03-28 12:29 宋文武
  2016-03-28 14:22 ` Ricardo Wurmus
  0 siblings, 1 reply; 3+ messages in thread
From: 宋文武 @ 2016-03-28 12:29 UTC (permalink / raw)
  To: guix-devel; +Cc: 宋文武

* gnu/packages/web.scm (uwsgi): New variable.
---
 gnu/packages/web.scm | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 516e623..53ab1a6 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
 ;;; Copyright © 2015, 2016 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
+;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3109,3 +3110,75 @@ callback or connection interfaces.")
      "Gumbo is an implementation of the HTML5 parsing algorithm implemented as
 a pure C99 library.")
     (license l:asl2.0)))
+
+(define-public uwsgi
+  (package
+    (name "uwsgi")
+    (version "2.0.12")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://projects.unbit.it/downloads/uwsgi-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "02g46dnw5j1iw8fsq392bxbk8d21b9pdgb3ypcinv3b4jzdm2srh"))))
+    (build-system gnu-build-system)
+    (outputs '("out" "python"))
+    (arguments
+     '(;; XXX: The 'check' target runs cppcheck to do static code analysis.
+       ;;      But there is no obvious way to run the real tests.
+       #:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           ;; Configuration is done by writting an ini file.
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out       (assoc-ref outputs "out"))
+                    (bindir    (string-append out "/bin"))
+                    (plugindir (string-append out "/lib/uwsgi")))
+               ;; The build phase outputs files to these directories directly.
+               (mkdir-p bindir)
+               (mkdir-p plugindir)
+               ;; XXX: Enable other plugins.
+               (call-with-output-file "buildconf/guix.ini"
+                 (lambda (port)
+                   (format port "[uwsgi]
+yaml = libyaml
+bin_name = ~a/uwsgi
+plugin_dir = ~a
+
+inherit = base
+plugins = cgi,python
+embedded_plugins =
+" bindir plugindir))))
+             (setenv "PROFILE" "guix")
+             #t))
+         (replace 'install
+           ;; Move plugins into their own output.
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out           (assoc-ref outputs "out"))
+                    (plugindir     (string-append out "/lib/uwsgi"))
+                    (python-plugin (string-append
+                                    plugindir "/python_plugin.so")))
+               (install-file python-plugin
+                             (string-append
+                              (assoc-ref outputs "python") "/lib/uwsgi"))
+               (delete-file python-plugin)
+               #t))))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)))
+    (inputs
+     `(("jansson" ,jansson)
+       ("libxml2" ,libxml2)
+       ("libyaml" ,libyaml)
+       ("openssl" ,openssl)
+       ("pcre" ,pcre)
+       ("zlib" ,zlib)))
+    (home-page "https://uwsgi-docs.readthedocs.org/")
+    (synopsis "Application container server")
+    (description
+     "uWSGI presents a complete stack for networked/clustered web applications,
+implementing message/object passing, caching, RPC and process management.
+It uses the uwsgi protocol for all the networking/interprocess communications.")
+    (license l:gpl2+))) ; with linking exception
-- 
2.6.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] gnu: Add uwsgi.
  2016-03-28 12:29 [PATCH] gnu: Add uwsgi 宋文武
@ 2016-03-28 14:22 ` Ricardo Wurmus
  2016-03-29  3:53   ` 宋文武
  0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Wurmus @ 2016-03-28 14:22 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel


宋文武 <iyzsong@gmail.com> writes:

> * gnu/packages/web.scm (uwsgi): New variable.
> ---
>  gnu/packages/web.scm | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 73 insertions(+)
>
> diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
> index 516e623..53ab1a6 100644
> --- a/gnu/packages/web.scm
> +++ b/gnu/packages/web.scm
> @@ -7,6 +7,7 @@
>  ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
>  ;;; Copyright © 2015, 2016 Eric Bavier <bavier@member.fsf.org>
>  ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
> +;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -3109,3 +3110,75 @@ callback or connection interfaces.")
>       "Gumbo is an implementation of the HTML5 parsing algorithm implemented as
>  a pure C99 library.")
>      (license l:asl2.0)))
> +
> +(define-public uwsgi
> +  (package
> +    (name "uwsgi")
> +    (version "2.0.12")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append "http://projects.unbit.it/downloads/uwsgi-"
> +                                  version ".tar.gz"))
> +              (sha256
> +               (base32
> +                "02g46dnw5j1iw8fsq392bxbk8d21b9pdgb3ypcinv3b4jzdm2srh"))))
> +    (build-system gnu-build-system)
> +    (outputs '("out" "python"))
> +    (arguments
> +     '(;; XXX: The 'check' target runs cppcheck to do static code analysis.
> +       ;;      But there is no obvious way to run the real tests.
> +       #:tests? #f
> +       #:phases
> +       (modify-phases %standard-phases
> +         (replace 'configure
> +           ;; Configuration is done by writting an ini file.

Should be “writing” not “writting”.

> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let* ((out       (assoc-ref outputs "out"))
> +                    (bindir    (string-append out "/bin"))
> +                    (plugindir (string-append out "/lib/uwsgi")))
> +               ;; The build phase outputs files to these directories directly.
> +               (mkdir-p bindir)
> +               (mkdir-p plugindir)
> +               ;; XXX: Enable other plugins.
> +               (call-with-output-file "buildconf/guix.ini"
> +                 (lambda (port)
> +                   (format port "[uwsgi]
> +yaml = libyaml
> +bin_name = ~a/uwsgi
> +plugin_dir = ~a
> +
> +inherit = base
> +plugins = cgi,python
> +embedded_plugins =
> +" bindir plugindir))))
> +             (setenv "PROFILE" "guix")
> +             #t))
> +         (replace 'install
> +           ;; Move plugins into their own output.
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let* ((out           (assoc-ref outputs "out"))
> +                    (plugindir     (string-append out "/lib/uwsgi"))
> +                    (python-plugin (string-append
> +                                    plugindir "/python_plugin.so")))
> +               (install-file python-plugin
> +                             (string-append
> +                              (assoc-ref outputs "python") "/lib/uwsgi"))
> +               (delete-file python-plugin)
> +               #t))))))

Is there any other reference to Python outside of this plugin?

> +    (native-inputs
> +     `(("pkg-config" ,pkg-config)
> +       ("python" ,python-wrapper)))

Should Python by among the regular inputs when it’s used by the Python
plugin?

> +    (inputs
> +     `(("jansson" ,jansson)
> +       ("libxml2" ,libxml2)
> +       ("libyaml" ,libyaml)
> +       ("openssl" ,openssl)
> +       ("pcre" ,pcre)
> +       ("zlib" ,zlib)))
> +    (home-page "https://uwsgi-docs.readthedocs.org/")
> +    (synopsis "Application container server")
> +    (description
> +     "uWSGI presents a complete stack for networked/clustered web applications,
> +implementing message/object passing, caching, RPC and process management.
> +It uses the uwsgi protocol for all the networking/interprocess communications.")
> +    (license l:gpl2+))) ; with linking exception

The rest looks good to me.  Thanks!

~~ Ricardo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gnu: Add uwsgi.
  2016-03-28 14:22 ` Ricardo Wurmus
@ 2016-03-29  3:53   ` 宋文武
  0 siblings, 0 replies; 3+ messages in thread
From: 宋文武 @ 2016-03-29  3:53 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Ricardo Wurmus <rekado@elephly.net> writes:

>
> Is there any other reference to Python outside of this plugin?
>
No, that's why I split it out.
> Should Python by among the regular inputs when it’s used by the Python
> plugin?
OK, agree.


Pushed, thanks for review!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-29  3:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-28 12:29 [PATCH] gnu: Add uwsgi 宋文武
2016-03-28 14:22 ` Ricardo Wurmus
2016-03-29  3:53   ` 宋文武

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).