Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When a package depends only on base and template-haskell, template-haskell is not present in the shell #2256

Open
ryantrinkle opened this issue Oct 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ryantrinkle
Copy link
Contributor

Describe the bug

I just created a new library with a cabal file, and listed base and template-haskell as dependencies, with no other dependencies. Upon entering a nix-shell, template-haskell was not present, and cabal repl failed as a result. After adding a non-built-in package to my package's build-depends, template-haskell was in the shell, and everything worked.

Steps To Reproduce

Create a minimal cabal package listing only base and template-haskell as dependencies. Enter a standard haskell.nix shell. Run ghc-pkg and observe that template-haskell is not present.

Expected behavior

template-haskell should be present in the nix shell.

Additional context

default.nix:

let haskell-nix = import ./dep/haskell.nix {};
    pkgs = import haskell-nix.sources.nixpkgs haskell-nix.nixpkgsArgs;
in pkgs.haskell-nix.project {
  src = pkgs.haskell-nix.haskellLib.cleanGit {
    name = "haskell-nix-project";
    src = ./.;
  };

  compiler-nix-name = "ghc982";
}

shell.nix:

(import ./default.nix).shellFor {
  tools = {
    cabal = "latest";
    haskell-language-server = "latest";
  };
}

haskell.nix revision: a8026bd

@ryantrinkle ryantrinkle added the bug Something isn't working label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant