nixos/rust-motd: .attrs.json -> "$NIX_ATTRS_JSON_FILE"

That way the derivation can also be built in a `nix-shell` where
`.attrs.json` isn't under "$NIX_BUILD_TOP".
This commit is contained in:
Maximilian Bosch 2023-09-21 01:09:32 +02:00
parent 11376df6d4
commit 214cf0b934
No known key found for this signature in database
GPG key ID: 9A6EEA275CA5BE0A

View file

@ -28,7 +28,7 @@ let
nativeBuildInputs = [ pkgs.remarshal pkgs.jq ];
})
''
cat "$NIX_BUILD_TOP"/.attrs.json \
cat "$NIX_ATTRS_JSON_FILE" \
| jq '${concatMapStringsSep " + " (key: ''."${key}"'') (attrNames orderedSections)}' \
| json2toml /dev/stdin "$out"
'';