guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#54852] [PATCH] gnu: Add openjdk18.


From: Maxime Devos
Subject: [bug#54852] [PATCH] gnu: Add openjdk18.
Date: Sat, 23 Apr 2022 16:38:17 +0200
User-agent: Evolution 3.38.3-1

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.

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]