guix-devel
[Top][All Lists]
Advanced

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

foreign-distro?


From: jgart
Subject: foreign-distro?
Date: Sun, 20 Nov 2022 14:54:40 -0600

Does Guix have a declarative Guix API way of knowing if it is installing
a package into foreign distro versus Guix System?

I'm thinking of a function like `foreign-distro?`:

```
(define-public peek
  (package
   (name "peek")
   ...
(inputs 
  `(,@(if (foreign-distro?) `(("ffmpeg" ,ffmpeg)) '())))
```

The above includes ffmpeg in the inputs only if installing peek on a
foreign distro. It could additionally patch the ffmpeg executable in
a peek package phases if foreign-distro? returns #t.

WDYT



reply via email to

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