Commit 7d42111
authored
devpkg: allow multiple/non-default package outputs (#1630)
Update `devpkg.Package` to use `FlakeInstallable` instead of a URL so
that it can correctly handle the flake outputs syntax. For example,
`flake:nixpkgs#prometheus^out,cli`.
Untangling parts of `devpkg` has been tricky, so this commit focuses on
changing only the pieces necessary to replace `Package.URL` with
`Package.installable`. There's still a lot more cleanup that can be
done.
Tested by adding/removing various flakes with and without outputs
specified:
```
$ devbox add prometheus
$ devbox run -- promtool --version
promtool: command not found
Error: error running script "promtool" in Devbox: exit status 127
$ devbox add flake:nixpkgs#prometheus
$ devbox run -- promtool --version
promtool: command not found
Error: error running script "promtool" in Devbox: exit status 127
$ devbox add flake:nixpkgs#prometheus^out,cli
$ devbox run -- promtool --version
promtool, version 2.47.2 (branch: unknown, revision: unknown)
build user: nix@nixpkgs
build date: unknown
go version: go1.21.3
platform: darwin/arm64
tags: builtinassets
$ devbox add path:$HOME/src/tailscale/tailscale
```
Related to #1431.1 parent 8a96716 commit 7d42111
File tree
6 files changed
+188
-154
lines changed- internal
- devpkg
- impl
- nix/nixprofile
- shellgen
6 files changed
+188
-154
lines changed
0 commit comments