From 2946501dbe814ab6c49beb7354f742d3cead9f3f Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Wed, 14 Dec 2022 14:10:34 +0100 Subject: use `file-append` from (guix gexp) instead of our own gexp function --- container.scm | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'container.scm') diff --git a/container.scm b/container.scm index 6972f5c..3155800 100644 --- a/container.scm +++ b/container.scm @@ -11,6 +11,8 @@ (hydrilla-json-schemas) (hydrilla) (ice-9 match) + ;; (guix gexp) is needed for `file-append`. + (guix gexp) ;; The following 4 are needed to construct GUIX_PYTHONPATH for ;; Hydrilla WSGI scripts. (guix build-system python) @@ -32,9 +34,6 @@ (define* (g-string-append #:rest args) #~(string-append #$@args)) -(define (g-package-file package file) - (g-string-append package "/" file)) - (define (httpd-conf-token arg) (match arg ((? string?) @@ -62,7 +61,7 @@ #$tag-name))) (define* (httpd-simple-wsgi-alias package wsgi-path #:key (aliased-path "/")) - (let ((wsgi-file (g-package-file package wsgi-path))) + (let ((wsgi-file (file-append package wsgi-path))) (g-string-append (httpd-tag 'Files (list wsgi-file) (httpd-directive 'Require 'all 'granted)) @@ -166,7 +165,7 @@ ;; Make HTTP clone happen through git-core instead of through CGit. CGit ;; only supports old HTTP "dumb" cloning protocol while we want the new ;; "smart" protocol. - ,(httpd-tag 'Directory (list (g-package-file git "/libexec/git-core")) + ,(httpd-tag 'Directory (list (file-append git "/libexec/git-core")) (httpd-directive 'Require 'all 'granted) (httpd-directive 'SetEnv "GIT_PROJECT_ROOT" "/var/lib/gitolite3/repositories") @@ -176,19 +175,19 @@ ,(httpd-directive 'ScriptAliasMatch "^/(.*/(HEAD|info/refs|objects/info/[^/]+|git-upload-pack))$" - (g-package-file git "/libexec/git-core/git-http-backend/$1")) + (file-append git "/libexec/git-core/git-http-backend/$1")) ;; Once all git-http-backend paths got handled, handle CGit ones. ,(httpd-directive - 'Alias "/cgit-static" (g-package-file cgit "/share/cgit")) + 'Alias "/cgit-static" (file-append cgit "/share/cgit")) ,(httpd-directive 'SetEnv "CGIT_CONFIG" %cgitrc-file) ,(httpd-directive - 'ScriptAlias "/" (g-package-file cgit "/lib/cgit/cgit.cgi/")) + 'ScriptAlias "/" (file-append cgit "/lib/cgit/cgit.cgi/")) - ,(httpd-tag 'Directory (list (g-package-file cgit "/lib/cgit/")) + ,(httpd-tag 'Directory (list (file-append cgit "/lib/cgit/")) (httpd-directive 'Options '+ExecCGI))))) (define %git-koszkonutek-tmp-virtualhost @@ -202,9 +201,8 @@ "*:80" `(,@(koszko-httpd-server-meta (string-append name ".koszko.org")) ,(httpd-directive - 'DocumentRoot (g-package-file - sheets-websites - (string-append "/share/" name "-website"))) + 'DocumentRoot (file-append sheets-websites + (string-append "/share/" name "-website"))) ,(koszko-httpd-redirect-if-other-host (string-append name ".koszko.org"))))) @@ -277,7 +275,7 @@ ,(httpd-directive 'Alias "/schemas" - (g-package-file hydrilla-json-schemas "/share/hydrilla-json-schemas")) + (file-append hydrilla-json-schemas "/share/hydrilla-json-schemas")) ,(httpd-directive 'DocumentRoot "/var/lib/hydrilla/malcontent_dirs") -- cgit v1.2.3