Subject: Re: bug#59725: [PATCH] gnu: paulxstretch: Fix paths

From: Ludovic Courtès <[email-masked]>
Date: Thu, 05 Jan 2023 22:48:25 +0100

Hi Sughosha,

Apologies for the delay!

Sughosha <[email-masked]> skribis:

> * gnu/packages/music.scm (paulxstretch): Fix paths.
> [arguments]: Add phase fix-paths.
> [inputs]: Add dconf and glib:bin.

That’s a welcome fix.

>             #~(modify-phases %standard-phases
> +               (add-after 'unpack 'fix-paths
> +                          (lambda _
> +                            (substitute* "deps/juce/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h"
> +                              (("/usr/include/freetype2")
> +                               (string-append #$freetype "/include/freetype")))
> +                            (substitute* "deps/juce/modules/juce_graphics/native/juce_linux_Fonts.cpp"
> +                              (("/etc/fonts")
> +                               (string-append #$fontconfig "/etc/fonts")))
> +                            (substitute* "deps/juce/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp"
> +                              (("/usr/bin/dconf")
> +                               (string-append #$dconf "/bin/dconf"))
> +                              (("/usr/bin/gsettings")
> +                               (string-append (ungexp glib "bin")
> +                                              "/bin/gsettings")))))

Could you avoid direct references to packages like #$freetype and
instead use ‘search-input-file’ and ‘search-input-directory’?

  (search-input-directory inputs "/etc/fonts")
  (search-input-file inputs "/bin/gsettings")
  …

There are examples in the repo on how to use them.

Could you send a v2 of the patch to [email-masked]?

Thanks in advance,
Ludo’.