a5729e5778e1

fix store path to use nixpkgs#attr instead of current-dir .#attr; v3.0.5

time
2026-05-29 22:44 UTC · 4 months ago
machine
koh2
parent
abf1280f1ad9
2 files build.zig.zon+1 −1src/exec.zig+3 −1
build.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.4",12+    .version = "3.0.5",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 allows

view file

src/exec.zig+3 −1
@@ -366,7 +366,9 @@366366 }367367 368368 pub fn storePath(gpa: std.mem.Allocator, io: std.Io, machine: *const types.Machine, attr: []const u8) ![]u8 {369-    const expr = try std.fmt.allocPrint(gpa, ".#{s}.outPath", .{attr});369+    // nixpkgs#<attr>, not .#<attr>: the package lives in nixpkgs (resolved via the370+    // flake registry), not a flake in the current directory.371+    const expr = try std.fmt.allocPrint(gpa, "nixpkgs#{s}.outPath", .{attr});370372     defer gpa.free(expr);371373     const r = try capture(gpa, io, machine, &.{ "nix", "eval", "--raw", expr });372374     defer gpa.free(r.stderr);

view file