Subject: No way of replacing an input in modify-input syntax structure but keep all the outputs

From: Gordon Quad <[email-masked]>
Date: Thu, 10 Feb 2022 10:09:41 +0000

poppler package include glib as a native-input with "bin" output.

If I am doing the following:

(package/inherit poppler
    (native-inputs
        (modify-inputs (package-native-inputs poppler)
            (replace "glib" my-glib))))

poppler's build will fail becuase replace syntax will replace "glib"
package erasing its outputs. I can specify output explicitly by doing
(replace "glib" (my-glib "bin")) in this case, but that makes mass input
modification difficult (e.g. if i want to replace all instances of glib
to my-glib).

That said there is a value in having such behaviour for replace syntax
in case for example if I replace package with my own version that has no
extra outputs, so it would be nice to have both options available.