Installables for this package. Installables is a nix concept defined here: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix.html#installables
()
| 260 | // Installables for this package. Installables is a nix concept defined here: |
| 261 | // https://nixos.org/manual/nix/stable/command-ref/new-cli/nix.html#installables |
| 262 | func (p *Package) Installables() ([]string, error) { |
| 263 | outputNames, err := p.GetOutputNames() |
| 264 | if err != nil { |
| 265 | return nil, err |
| 266 | } |
| 267 | installables := []string{} |
| 268 | for _, outputName := range outputNames { |
| 269 | i, err := p.InstallableForOutput(outputName) |
| 270 | if err != nil { |
| 271 | return nil, err |
| 272 | } |
| 273 | installables = append(installables, i) |
| 274 | } |
| 275 | if len(installables) == 0 { |
| 276 | // This means that the package is not in the binary cache |
| 277 | // OR it is a flake (??) |
| 278 | installable, err := p.urlForInstall() |
| 279 | if err != nil { |
| 280 | return nil, err |
| 281 | } |
| 282 | return []string{installable}, nil |
| 283 | } |
| 284 | return installables, nil |
| 285 | } |
| 286 | |
| 287 | func (p *Package) InstallableForOutput(output string) (string, error) { |
| 288 | inCache, err := p.IsOutputInBinaryCache(output) |
no test coverage detected