From 214cf0b9343dc619a36aedd2320bb1d73915c6de Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 21 Sep 2023 01:09:32 +0200 Subject: [PATCH] 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". --- nixos/modules/programs/rust-motd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/programs/rust-motd.nix b/nixos/modules/programs/rust-motd.nix index 3e3ce63ab212..8999e882d01a 100644 --- a/nixos/modules/programs/rust-motd.nix +++ b/nixos/modules/programs/rust-motd.nix @@ -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" '';