outputs are not handled correctly with __structuredAttrs

#395
Opened by qyliss at 2024-04-08T21·10+00

derivation {
  name = "test";                                                          
  system = builtins.currentSystem;
  builder = "/bin/sh";
  __structuredAttrs = true;
  outputs = [ "out"];
}

cppnix produces:

Derive(
  [
    ("out", "/nix/store/x354flx7snrjbrbc93y12xxiq3qh64s1-test", "", "")
  ],
  [],
  [],
  "aarch64-linux",
  "/bin/sh",
  [],
  [
    ("__json", "{\"builder\":\"/bin/sh\", \"name\":\"test\", \"outputs\":[\"out\"], \"system\":\"aarch64-linux\"}"),
    ("out", "/nix/store/x354flx7snrjbrbc93y12xxiq3qh64s1-test")
  ]
)

tvix produces:

Derive(
  [
    ("out", "/nix/store/1vbgrw7x7vsb94ga6w1yd2qavz0rwbac-test", "", "")
  ],
  [],
  [],
  "aarch64-linux",
  "/bin/sh",
  [],
  [
    ("__json", "{\"builder\":\"/bin/sh\", \"name\":\"test\", \"system\":\"aarch64-linux\"}"),
    ("out", "/nix/store/1vbgrw7x7vsb94ga6w1yd2qavz0rwbac-test"),
    ("outputs", "out")
  ]
)

So outputs should be included in __json, and not in a string environment variable.

  1. fixed by https://cl.tvl.fyi/11386.

    flokli at 2024-04-08T21·33+00

  2. flokli closed this issue at 2024-04-08T21·44+00