From 022502864c3e445acc1cc246497b48a68fccbfbc Mon Sep 17 00:00:00 2001 From: kinect-bot Date: Mon, 30 Nov 2026 10:07:25 -0500 Subject: [PATCH] fix(build): give the flake default apps/packages so bare nix run works nix run with no args resolves to apps..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 --- flake.nix | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 61723fa..726b3c7 100644 --- a/flake.nix +++ b/flake.nix @@ -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";