Skip to content

feat: Add Nix language support (.nix) #332

@uxtechie

Description

@uxtechie

Description

Add support for the Nix expression language (.nix files) to CodeGraph.

Nix is a purely functional language used to define package builds, system configurations, and development environments in the Nix ecosystem (Nix package manager, NixOS, flakes). Nix codebases can grow large and complex — projects like nixpkgs contain 100k+ .nix files — making them a strong use case for CodeGraph's semantic indexing.

Requested capabilities

  • Symbol extraction: Variables, functions (including curried and destructured signatures with @ alias patterns), and inherit/inherit (expr) declarations
  • Import resolution: Resolve import ./path.nix and import ./directory (→ default.nix) to file nodes
  • Export detection: Distinguish top-level attribute set members (exported) from let-local bindings (private)
  • Call references: Extract function calls from apply_expression, distinguishing import from regular calls

Related

  • Nix flake please? #324 — Requests distributing CodeGraph as a Nix flake (packaging/installation). This issue covers parsing and indexing Nix source files as a language.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions