class_docstr: For the `Nix language <http://nixos.org/nix/>`_.
  
  .. versionadded:: 2.0
class_docstr_tok: ["For","the","`","Nix","language","<","http",":","\/\/nixos.org\/nix\/",">","`","_",".","..","versionadded",":",":","2.0"]
code: def analyse_text(text):
      rv = 0.0
      # TODO: let/in
      if re.search(r"import.+?<[^>]+>", text):
          rv += 0.4
      if re.search(r"mkDerivation\s+(\(|\{|rec)", text):
          rv += 0.4
      if re.search(r"=\s+mkIf\s+", text):
          rv += 0.4
      if re.search(r"\{[a-zA-Z,\s]+\}:", text):
          rv += 0.1
      return rv
  
imports: import re
  from pygments.lexer import RegexLexer, include
  from pygments.token import Text, Comment, Operator, Keyword, Name, String, Number, Punctuation, Literal
label_desc: Use image node_id 1 for calling the NixLexer obj's underlying member method code with example usage: obj.analyse_text(text) and returns: rv