diff options
author | pacien | 2023-02-03 22:09:55 +0000 |
---|---|---|
committer | Michael Davis | 2023-09-16 20:09:07 +0000 |
commit | b4494e1dc54f342d8c765b793bf934ae730b5253 (patch) | |
tree | 7cd72722d83b68cc624dd8f8ea11a9ecef3179cc /runtime/queries | |
parent | 0e556484b7dbb4078a416ef0b3d923a206e6670e (diff) |
queries/nix: add injection rule for python test scripts
Diffstat (limited to 'runtime/queries')
-rw-r--r-- | runtime/queries/nix/injections.scm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/queries/nix/injections.scm b/runtime/queries/nix/injections.scm index 1da63ce0..03a6dc36 100644 --- a/runtime/queries/nix/injections.scm +++ b/runtime/queries/nix/injections.scm @@ -6,6 +6,16 @@ (indented_string_expression (string_fragment) @injection.content)) (#set! injection.combined)) +; Common attribute keys corresponding to Python scripts, +; such as those for NixOS VM tests in nixpkgs/nixos/tests. +((binding + attrpath: (attrpath (identifier) @_path) + expression: (indented_string_expression + (string_fragment) @injection.content)) + (#match? @_path "(^|\\.)testScript$") + (#set! injection.language "python") + (#set! injection.combined)) + ; Common attribute keys corresponding to scripts, ; such as those of stdenv.mkDerivation. ((binding |