about summary refs log tree commit diff
path: root/nixos/modules/programs
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2023-09-21 01:09:32 +0200
committerMaximilian Bosch <maximilian@mbosch.me>2023-09-21 13:17:13 +0200
commit214cf0b9343dc619a36aedd2320bb1d73915c6de (patch)
tree1d1dfb52ee8ff909dc18304f7cb9168247698ab4 /nixos/modules/programs
parent11376df6d40c8fdbbd3c9a048b742dc032a88d15 (diff)
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".
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r--nixos/modules/programs/rust-motd.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/programs/rust-motd.nix b/nixos/modules/programs/rust-motd.nix
index 3e3ce63ab212c..8999e882d01a2 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"
     '';