mirror of
https://gitlab.univ-nantes.fr/glicid-public/guix-glicid.git
synced 2025-04-29 21:58:36 +02:00
nginx-ldap-auth
This commit is contained in:
parent
addd01d341
commit
5c1dfeb662
1 changed files with 91 additions and 30 deletions
|
@ -5,7 +5,8 @@
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
#:use-module (guix build-system gnu)
|
#:use-module (guix build-system gnu)
|
||||||
#:use-module (gnu packages web)
|
#:use-module (gnu packages web)
|
||||||
#:use-module (glicid packages openldap)
|
; #:use-module (glicid packages openldap)
|
||||||
|
#:use-module (gnu packages openldap)
|
||||||
)
|
)
|
||||||
|
|
||||||
(define-public nginx-ldap-auth-module
|
(define-public nginx-ldap-auth-module
|
||||||
|
@ -33,42 +34,102 @@
|
||||||
("openldap", openldap)
|
("openldap", openldap)
|
||||||
,@(package-inputs nginx)))
|
,@(package-inputs nginx)))
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments
|
(substitute-keyword-arguments
|
||||||
`(#:configure-flags '("--add-dynamic-module=.")
|
`(#:configure-flags '("--add-dynamic-module=.")
|
||||||
#:make-flags '("modules")
|
#:make-flags '("modules")
|
||||||
; #:modules ((guix build utils)
|
,@(package-arguments nginx)
|
||||||
; (guix build gnu-build-system)
|
)
|
||||||
; (ice-9 popen)
|
((#:phases phases)
|
||||||
; (ice-9 regex)
|
`(modify-phases ,phases
|
||||||
; (ice-9 textual-ports))
|
|
||||||
,@(package-arguments nginx))
|
|
||||||
((#:phases phases)
|
|
||||||
`(modify-phases ,phases
|
|
||||||
(add-after 'unpack 'unpack-nginx-sources
|
(add-after 'unpack 'unpack-nginx-sources
|
||||||
(lambda* (#:key inputs native-inputs #:allow-other-keys)
|
(lambda* (#:key inputs native-inputs #:allow-other-keys)
|
||||||
(begin
|
(begin
|
||||||
;; The nginx source code is part of the module’s source.
|
;; The nginx source code is part of the module’s source.
|
||||||
(format #t "decompressing nginx source code~%")
|
(format #t "decompressing nginx source code~%")
|
||||||
(let ((tar (assoc-ref inputs "tar"))
|
(let ((tar (assoc-ref inputs "tar")) (nginx-srcs (assoc-ref inputs "nginx-sources")))
|
||||||
(nginx-srcs (assoc-ref inputs "nginx-sources")))
|
(invoke (string-append tar "/bin/tar") "xvf" nginx-srcs "--strip-components=1")
|
||||||
(invoke (string-append tar "/bin/tar")
|
)
|
||||||
"xvf" nginx-srcs "--strip-components=1"))
|
#t
|
||||||
#t)))
|
)
|
||||||
; (replace 'install
|
)
|
||||||
; (lambda* (#:key outputs #:allow-other-keys)
|
)
|
||||||
; (let ((modules-dir (string-append (assoc-ref outputs "out")
|
(replace 'install
|
||||||
; "/etc/nginx/modules")))
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
; (install-file "objs/ngx_http_lua_module.so" modules-dir)
|
(let ((modules-dir (string-append (assoc-ref outputs "out") "/etc/nginx/modules")))
|
||||||
; #t)))
|
(install-file "objs/ngx_http_auth_ldap_module.so" modules-dir)
|
||||||
|
#t
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(delete 'fix-root-dirs)
|
||||||
|
(delete 'install-man-page)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
;(define-public nginx-modsecurity
|
||||||
|
; (package
|
||||||
|
; (inherit nginx)
|
||||||
|
; (name "nginx-modsecurity")
|
||||||
|
; (version "3.0.5")
|
||||||
|
; (source
|
||||||
|
; (origin
|
||||||
|
; (method url-fetch)
|
||||||
|
; (uri (list
|
||||||
|
; (string-append "https://github.com/SpiderLabs/ModSecurity/releases/download/v3.0.5/modsecurity-v" version ".tar.gz")
|
||||||
|
; )
|
||||||
|
; )
|
||||||
|
; (sha256 (base32 "1sarp7bjvkkdlpky5j9axfi0qmb177vw2vn2s10c8fcdg9dgj6vm" ))
|
||||||
|
; )
|
||||||
|
; )
|
||||||
|
; (synopsis "modsecurity module for nginx")
|
||||||
|
; (description "modsecurity module for nginx.")
|
||||||
|
; (build-system gnu-build-system)
|
||||||
|
; (inputs
|
||||||
|
; `(("nginx-sources" ,(package-source nginx))
|
||||||
|
; ("openldap", openldap)
|
||||||
|
; ,@(package-inputs nginx)))
|
||||||
|
; (arguments
|
||||||
|
; (substitute-keyword-arguments
|
||||||
|
; `(#:configure-flags '("--add-dynamic-module=.")
|
||||||
|
; #:make-flags '("modules")
|
||||||
|
; ,@(package-arguments nginx)
|
||||||
|
; )
|
||||||
|
; ((#:phases phases)
|
||||||
|
; `(modify-phases ,phases
|
||||||
|
; (replace 'configure
|
||||||
|
; (lambda* (#:key output #:allow-other-keys)
|
||||||
|
; (invoke "./configure" "--enable-standalone-module" "make" )
|
||||||
|
; )
|
||||||
|
; )
|
||||||
|
;; (add-after 'configure 'unpack-nginx-sources
|
||||||
|
;; (lambda* (#:key inputs native-inputs #:allow-other-keys)
|
||||||
|
;; (begin
|
||||||
|
;; ;; The nginx source code is part of the module’s source.
|
||||||
|
;; (format #t "decompressing nginx source code~%")
|
||||||
|
;; (let ((tar (assoc-ref inputs "tar")) (nginx-srcs (assoc-ref inputs "nginx-sources")))
|
||||||
|
;; (invoke (string-append tar "/bin/tar") "xvf" nginx-srcs "--strip-components=1")
|
||||||
|
;; )
|
||||||
|
;; #t
|
||||||
|
;; )
|
||||||
|
;; )
|
||||||
|
;; )
|
||||||
|
;; (replace 'install
|
||||||
|
;; (lambda* (#:key outputs #:allow-other-keys)
|
||||||
|
;; (let ((modules-dir (string-append (assoc-ref outputs "out") "/etc/nginx/modules")))
|
||||||
|
;; (install-file "objs/ngx_http_auth_ldap_module.so" modules-dir)
|
||||||
|
;; #t
|
||||||
|
;; )
|
||||||
|
;; )
|
||||||
|
;; )
|
||||||
; (delete 'fix-root-dirs)
|
; (delete 'fix-root-dirs)
|
||||||
; (delete 'install-man-page)
|
; (delete 'install-man-page)
|
||||||
))))))
|
; )
|
||||||
|
; )
|
||||||
|
; )
|
||||||
|
; )
|
||||||
nginx-ldap-auth-module
|
|
||||||
|
|
||||||
;(define-public nginx-mod_security
|
|
||||||
; (package
|
|
||||||
; )
|
; )
|
||||||
;)
|
;)
|
||||||
|
|
Loading…
Add table
Reference in a new issue