[Feature request] Create Nix packages for the packages required to run the Cuttlefish virtual device
robbins opened this issue · 1 comments
Currently, running the launch_cvd
command after compiling AOSP for a Cuttlefish-supported lunch target results in the following error:
sh: line 1: /usr/lib/cuttlefish-common/bin/capability_query.py: No such file or directory
VM manager crosvm is not supported on this machine.
Invalid vm_manager: crosvm
E launch_cvd: subprocess.cpp:198 Subprocess 1628684 was interrupted by a signal 'Aborted' (6)
E launch_cvd: main.cc:436 assemble_cvd returned -1
The Cuttlefish virtual device requires a number of (Debian) host packages, listed here: https://github.com/google/android-cuttlefish
It looks like cuttlefish-base
and cuttlefish-user
are all that are directly used when running Cuttlefish locally.
This is also required if acloud
were to be packaged later using Nix as well.
The launch_cvd
output has changed (AOSP main of a few months back), now failing at a different location because it can't talk to the Cuttlefish client as it's not installed.
> launch_cvd
3. main.cc:132 | CvdMain |
2. client.h:67 | HandleCommand |
1. client.cpp:362 | HandleCommand |
| device/google/cuttlefish/host/commands/cvd/client.cpp:445
v Result<void> cuttlefish::CvdClient::CheckStatus(const cvd::Status &, const std::string &)
Received error response for "HandleCommand":
7. server.cc:436 | HandleRequest |
6. start.cpp:660 | Handle |
5. start.cpp:401 | GetGroupCreationInfo |
4. instance_manager.cpp:103 | Analyze |
3. creation_analyzer.cpp:62 | Analyze |
2. creation_analyzer.cpp:304 | Analyze |
1. creation_analyzer.cpp:230 | AnalyzeInstanceIds |
| device/google/cuttlefish/host/commands/cvd/selector/creation_analyzer.cpp:198
| Result<std::vector<PerInstanceInfo>> cuttlefish::selector::CreationAnalyzer::AnalyzeInstanceIdsInternal()
v CF_EXPECT(allocated_ids_opt != std::nullopt)
Unique ID allocation failed.
In client
I'd be willing to give it a shot as the packages in the repo don't seem too complex, but it seems like it does a variety of things with NetworkManager config, udev rules, etc. and I'm not sure how that would look in a Nix derivation - maybe there's a similar example for another Debian-based package in Nixpkgs somewhere?
Maybe the Docker approach would be better, although the setup script for that seems complex as well.