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: Rostislav Svoboda
Subject: [bug#54852] [PATCH] gnu: Add openjdk18.
Date: Fri, 22 Apr 2022 12:59:35 +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`.

Cheers
Bost





reply via email to

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