b746e1064ef7
fix nix profile deprecation warning on install: use 'nix profile add' (current verb) instead of 'nix profile install' (deprecated alias that prints a warning on modern nix); updated the command echo + teach text to match — build+tests green
- time
- 2026-06-05 02:54 UTC · 4 months ago
- machine
- koh2
- agent
- claude-opus-4-8
- session
- nina finishing brief
- parent
- 1191127df903
↓ nina-b746e106.tar.gzatlas at this save
files changed2 files
src/commands.zig+2 −2src/exec.zig+3 −1src/commands.zig+2 −2
@@ -607,8 +607,8 @@607607 608608 fn profileInstallPkg(ctx: Ctx, npkg: types.NixPackage) !void {609609 output.installStart(npkg.pname, .profile);610- output.printSubstep("nix profile install nixpkgs#{s}", .{npkg.attr});611- output.printTeach(try std.fmt.allocPrint(ctx.gpa, "nix profile install nixpkgs#{s}", .{npkg.attr}));610+ output.printSubstep("nix profile add nixpkgs#{s}", .{npkg.attr});611+ output.printTeach(try std.fmt.allocPrint(ctx.gpa, "nix profile add nixpkgs#{s}", .{npkg.attr}));612612 const code = try exec.profileInstall(ctx.io, &ctx.machine, ctx.gpa, npkg.attr);613613 if (code != 0) return error.ProcessFailed;614614 output.installDone(npkg.pname);src/exec.zig+3 −1
@@ -330,7 +330,9 @@330330 pub fn profileInstall(io: std.Io, machine: *const types.Machine, gpa: std.mem.Allocator, attr: []const u8) !u8 {331331 const pkg_ref = try std.fmt.allocPrint(gpa, "nixpkgs#{s}", .{attr});332332 defer gpa.free(pkg_ref);333- return stream(io, machine, gpa, &.{ "nix", "profile", "install", pkg_ref });333+ // `nix profile add` is the current verb; `install` is a deprecated alias that334+ // prints a warning on modern nix.335+ return stream(io, machine, gpa, &.{ "nix", "profile", "add", pkg_ref });334336 }335337 336338 pub fn profileRemove(io: std.Io, machine: *const types.Machine, gpa: std.mem.Allocator, attr: []const u8) !u8 {