64ae2f75ae45
fix profile remove to use element name not nixpkgs# flake ref; v3.0.7
- time
- 2026-05-30 01:11 UTC · 4 months ago
- machine
- koh2
- parent
- 66158d7cb9d9
↓ nina-64ae2f75.tar.gzatlas at this save
files changed2 files
build.zig.zon+1 −1src/exec.zig+3 −3build.zig.zon+1 −1
@@ -9,7 +9,7 @@99 .name = .nina,1010 // This is a [Semantic Version](https://semver.org/).1111 // In a future version of Zig it will be used for package deduplication.12- .version = "3.0.6",12+ .version = "3.0.7",1313 // Together with name, this represents a globally unique package1414 // identifier. This field is generated by the Zig toolchain when the1515 // package is first created, and then *never changes*. This allowssrc/exec.zig+3 −3
@@ -298,9 +298,9 @@298298 }299299 300300 pub fn profileRemove(io: std.Io, machine: *const types.Machine, gpa: std.mem.Allocator, attr: []const u8) !u8 {301- const pkg_ref = try std.fmt.allocPrint(gpa, "nixpkgs#{s}", .{attr});302- defer gpa.free(pkg_ref);303- return stream(io, machine, gpa, &.{ "nix", "profile", "remove", pkg_ref });301+ // `nix profile remove` matches by profile element name (e.g. "ripgrep"), not302+ // by flake ref — passing nixpkgs#ripgrep matches nothing.303+ return stream(io, machine, gpa, &.{ "nix", "profile", "remove", attr });304304 }305305 306306 pub fn profileList(gpa: std.mem.Allocator, io: std.Io, machine: *const types.Machine) ![]u8 {