In a #nixos #build and #switch of a #flake, my entire #rust #derivation ( which is just a program in the flake ) gets built meaning that it takes eons: even if the change to the flake that made the build necessary was a trivial change to a thing that has no interaction with the rust derivation. What am I doing wrong? Thanks for any pointers... #flakes #buildtime #buildtimes
Problem was flakeRoot = "${inputs.self}" in #rust #derivation in flake caused the rust code to swallow whole flake anew for any flake file change, even changes completely unrelated to the rust code, meaning a whole rebuild. Changed that to a find_flake_dir() function that discovers flake directory by walking up if FLAKE_DIR environment variable is not set.
Took time down from always 22 mins, to 2 mins 20 sec for a minor nix fix rebuild. Ta #Claudeai #buildtime #buildtimes #nix #nixos
#flake
👾