fix(build): give the flake default apps/packages so bare nix run works
nix run with no args resolves to apps.<system>.default (or packages.default as a fallback), neither of which the flake defined - only the explicitly named apps.tracker/core-test/shim-build existed, so a bare nix run errored with "does not provide attribute ... default". Added apps.default (aliased to the tracker app, so nix run with no args launches the tracker, matching the args.--source default of webcam 0) and packages.default (the tracker's Nix-built environment via mkVirtualEnv). Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
This commit is contained in:
1 parent
97d287e439
commit
022502864c
1 file changed
+18
-4
@@ -116,16 +116,24 @@
|
||||
}
|
||||
);
|
||||
|
||||
packages = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
pythonSet = pythonSets.${system};
|
||||
in
|
||||
{
|
||||
default = pythonSet.mkVirtualEnv "kinect-tracker-env" workspace.deps.default;
|
||||
}
|
||||
);
|
||||
|
||||
apps = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
pythonSet = pythonSets.${system};
|
||||
trackerEnv = pythonSet.mkVirtualEnv "kinect-tracker-env" workspace.deps.all;
|
||||
in
|
||||
{
|
||||
# nix run .#tracker -- --source 0 --depth-size 640x480 --shm-name virtual_kinect_frames
|
||||
tracker = {
|
||||
trackerApp = {
|
||||
type = "app";
|
||||
program = toString (
|
||||
pkgs.writeShellScript "kinect-tracker-run" ''
|
||||
@@ -133,6 +141,12 @@
|
||||
''
|
||||
);
|
||||
};
|
||||
in
|
||||
{
|
||||
# nix run .#tracker -- --source 0 --depth-size 640x480 --shm-name virtual_kinect_frames
|
||||
# nix run (no args) defaults to the tracker too.
|
||||
default = trackerApp;
|
||||
tracker = trackerApp;
|
||||
|
||||
core-test = {
|
||||
type = "app";
|
||||
|
||||
Reference in new issue
Block a user