diff mbox series

[bug#55253,1/2] gnu: nginx-rtmp-module: Use #:configure-flags from nginx.

Message ID 20220522055157.31807-1-jackhill@jackhill.us
State Accepted
Headers show
Series nginx-rtmp-module use nginx's #:configure-flags and update to gexps in phases | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Jack Hill May 22, 2022, 5:51 a.m. UTC
* gnu/packages/web.scm (nginx-rtmp-module)[arguments]: Simplify copying
of arguments from nginx and augment #:configure-flags from nginx
rather than overwriting.
---
 gnu/packages/web.scm | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

Comments

Ludovic Courtès May 23, 2022, 12:57 p.m. UTC | #1
Hi Jack,

Jack Hill <jackhill@jackhill.us> skribis:

> * gnu/packages/web.scm (nginx-rtmp-module)[arguments]: Simplify copying
> of arguments from nginx and augment #:configure-flags from nginx
> rather than overwriting.
> ---
>  gnu/packages/web.scm | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
> index 600ef0c895..50401c07e1 100644
> --- a/gnu/packages/web.scm
> +++ b/gnu/packages/web.scm
> @@ -785,12 +785,9 @@ (define-public nginx-rtmp-module
>       `(("nginx-sources" ,(package-source nginx))
>         ,@(package-inputs nginx)))
>      (arguments
> -     (substitute-keyword-arguments
> -         `(#:make-flags '("modules")
> -           #:modules ((guix build utils)
> -                      (guix build gnu-build-system))
> -           ,@(package-arguments nginx)
> -           #:configure-flags '("--add-dynamic-module=."))
> +     (substitute-keyword-arguments (package-arguments nginx)
> +       ((#:configure-flags flags)
> +        #~(cons "--add-dynamic-module=." #$flags))

If I’m not mistaken, #:make-flags and #:modules are lost here, no?
Or were they unnecessary in the first place?

Thanks,
Ludo’.
Jack Hill May 23, 2022, 2:11 p.m. UTC | #2
On Mon, 23 May 2022, Ludovic Courtès wrote:

> Jack Hill <jackhill@jackhill.us> skribis:
>>
>> diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
>> index 600ef0c895..50401c07e1 100644
>> --- a/gnu/packages/web.scm
>> +++ b/gnu/packages/web.scm
>> @@ -785,12 +785,9 @@ (define-public nginx-rtmp-module
>>       `(("nginx-sources" ,(package-source nginx))
>>         ,@(package-inputs nginx)))
>>      (arguments
>> -     (substitute-keyword-arguments
>> -         `(#:make-flags '("modules")
>> -           #:modules ((guix build utils)
>> -                      (guix build gnu-build-system))
>> -           ,@(package-arguments nginx)
>> -           #:configure-flags '("--add-dynamic-module=."))
>> +     (substitute-keyword-arguments (package-arguments nginx)
>> +       ((#:configure-flags flags)
>> +        #~(cons "--add-dynamic-module=." #$flags))
>
> If I’m not mistaken, #:make-flags and #:modules are lost here, no?
> Or were they unnecessary in the first place?

You are not mistaken, they are lost. They do seem to be unnecessary 
though. nginx is able to load and make use of the module without them.

Best,
Jack
Jack Hill May 27, 2022, 2:02 a.m. UTC | #3
On Mon, 23 May 2022, Jack Hill wrote:

> On Mon, 23 May 2022, Ludovic Courtès wrote:
>
>> Jack Hill <jackhill@jackhill.us> skribis:
>>> 
>>> diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
>>> index 600ef0c895..50401c07e1 100644
>>> --- a/gnu/packages/web.scm
>>> +++ b/gnu/packages/web.scm
>>> @@ -785,12 +785,9 @@ (define-public nginx-rtmp-module
>>>       `(("nginx-sources" ,(package-source nginx))
>>>         ,@(package-inputs nginx)))
>>>      (arguments
>>> -     (substitute-keyword-arguments
>>> -         `(#:make-flags '("modules")
>>> -           #:modules ((guix build utils)
>>> -                      (guix build gnu-build-system))
>>> -           ,@(package-arguments nginx)
>>> -           #:configure-flags '("--add-dynamic-module=."))
>>> +     (substitute-keyword-arguments (package-arguments nginx)
>>> +       ((#:configure-flags flags)
>>> +        #~(cons "--add-dynamic-module=." #$flags))
>> 
>> If I’m not mistaken, #:make-flags and #:modules are lost here, no?
>> Or were they unnecessary in the first place?
>
> You are not mistaken, they are lost. They do seem to be unnecessary though. 
> nginx is able to load and make use of the module without them.

I realized the value of the make-flags. It saves effort when building, as 
only the module is build not all of nginx again. The output is identical. 
I'll send a v2 with those added back. I still don't see the value of the 
modules.

Best,
Jack
diff mbox series

Patch

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 600ef0c895..50401c07e1 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -785,12 +785,9 @@  (define-public nginx-rtmp-module
      `(("nginx-sources" ,(package-source nginx))
        ,@(package-inputs nginx)))
     (arguments
-     (substitute-keyword-arguments
-         `(#:make-flags '("modules")
-           #:modules ((guix build utils)
-                      (guix build gnu-build-system))
-           ,@(package-arguments nginx)
-           #:configure-flags '("--add-dynamic-module=."))
+     (substitute-keyword-arguments (package-arguments nginx)
+       ((#:configure-flags flags)
+        #~(cons "--add-dynamic-module=." #$flags))
        ((#:phases phases)
         #~(modify-phases #$phases
             (add-after 'unpack 'unpack-nginx-sources