Skip to content

make test doesn't work in nix develop shell #16

@antifuchs

Description

@antifuchs

I'm trying to figure out how to run make test from a nix devshell, but am running into a wall.

The way things currently work, you have to manually run the helper script that installs the latest nix grammar; that will modify my personal environment and I'd much rather the nix shell does that.

I tried the following in flake.nix, but it didn't have an effect (the resulting ert-runner still can't find the nix grammar, with a bonus issue of not finding nix-ts-mode.el on the load path):

        # [in the `devShells.default` attribute):
        packages = let
          pkgs = nixpkgs-unstable.legacyPackages.${system};
          nixTSEmacs = (pkgs.emacsPackagesFor pkgs.emacs).emacsWithPackages (epkgs: [
            (epkgs.treesit-grammars.with-grammars (p: [p.tree-sitter-nix]))
            epkgs.package-build
          ]);
          cask = (pkgs.cask.overrideAttrs (o: {
            buildInputs = o.buildInputs ++ [pkgs.tree-sitter-grammars.tree-sitter-nix];
            nativeBuildInputs = [nixTSEmacs];
          }));
          in [
            cask
            pkgs.python311
            nixTSEmacs
          ];

Any help there would be appreciated - I don't think I fully get how cask & emacs in a devshell are meant to interact.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions