Rostislav Svoboda schreef op vr 22-04-2022 om 12:59 [+0200]: > > Is something like > > > >    (modify-inputs (package-native-inputs opendjk17) > >      (replace "openjdk16:jdk" openjdk17)) > > > > possible? > > I think more appropriate would be: > > (modify-inputs (package-native-inputs openjdk17) >       (replace "openjdk16:jdk" `(,openjdk17 "jdk"))) > > however that would mean to assign a value Y to a variable named > "I-represent-a-value-of-X". So hmm, better not this way. > > I personally prefer the: > > (native-inputs >      (map (lambda (input) >             (match (car input) >               ("openjdk16:jdk" `("openjdk17:jdk" ,openjdk17 "jdk")) >               (_ input))) >           (package-native-inputs openjdk17))) > > variant. IMO it better expresses the idea of substitution. > > Here, (if such a pattern repeats) we could define a new syntax > `substitue` in the guix/packages.scm analogical to `delete`, > `prepend`, `append` and `replace`. Isn't this just (modify-inputs ... (replace "..." ...))? What's the difference between 'replace' and 'substitute'? They conceptually seem to be about the same to me. And in case of substitute, I'm more thinking of 'substitute*' than package inputs. Greetings, Maxime.