Subject: Re: [bug#73682] [PATCH 3/3] gnu: varnish: Improve style.

From: Ludovic Courtès <[email-masked]>
Date: Tue, 15 Oct 2024 18:25:55 +0200

Nicolas Graves <[email-masked]> skribis:

> * gnu/packages/web.scm (varnish): Improve style.
>   [arguments]: Rewrite using gexps.
>   [inputs]: Replace coreutils by coreutils-minimal, python by
>   python-minimal. Add glibc.

[...]

> +             ;; Varnish uses GCC to compile VCL, so wrap it with required GCC
> +             ;; environment variables to avoid propagating them to profiles.
> +             (lambda _
> +               (wrap-program (string-append #$output "/sbin/varnishd")
>                   ;; Add binutils to PATH so gcc finds the 'as' executable.
> -                 `("PATH" ":" prefix (,PATH))
> +                 `("PATH" ":" prefix (,(dirname (which "as"))))
>                   ;; Make sure 'crti.o' et.al is found.
> -                 `("LIBRARY_PATH" ":" prefix (,LIBRARY_PATH)))))))))
> +                 `("LIBRARY_PATH" ":" prefix
> +                    (,#$(file-append (this-package-input "glibc") "/lib"))))))))))

If we assume we’ll never want to cross-compile Varnish (sounds
reasonable to me), use:

  (dirname (search-input-file inputs "/lib/libc.so"))

and do *not* add ‘glibc’ as an input, as this effectively adds a
dependency on a second glibc.

Ludo’.