Skip to content

Conversation

@yaitskov
Copy link

copilot has a few native dependencies (llvm, SMT solvers and proof assistants). Setting all of them seems a time consuming task.

I have been using nix for setting Haskell dev environments for many years and I loved it because it helps new members to spend less time on accomodation and gives more consistent view on the project across team.

An attempt to work with nixified cabal subpackages in HLS discovered an issue with root cabal file.

To build project: nix-build.
To enter a dev env: nix-shell.
Commands should be entered in sub package directories (where default.nix files are located). callCabal2Nix does not support multi packages but nix is more flexible than cabal and rigid tree structure is not required - dependencies (eg copilot-core) have their own nix files.

@ivanperez-keera
Copy link
Member

ivanperez-keera commented Nov 16, 2025

Note: this PR does things that are useful and seem unrelated to nix, like bumping version numbers of dependencies. Those can (and should) be addressed separately. We are waiting for GHC 9.14 to be released so that haskell-unordered-containers/hashable#319 and haskell-unordered-containers/hashable#318 are closed, and we can bump the versions of all dependencies. A good way to help on that front would be to send PRs for those tickets in haskell-unordered-containers.

As for the inclusion of nix recipes here: I don't use nix, and AFAIK we don't have any users who do (I'm happy to be proven wrong). I fear that we won't be able to do a good job at maintaining those. Is there a way for the formulas to live outside of this repo, and for someone in the nix project to maintain those?

@ivanperez-keera
Copy link
Member

Also, from what I see, it seems that copilot is already available on NixOS. For example, see: https://hydra.nixos.org/job/nixpkgs/trunk/haskellPackages.copilot-core.x86_64-linux

Is there a reason why those formulas need to be here? Can they be elsewhere?

@yaitskov
Copy link
Author

Nix files are just for development.
Nix saves time during onboarding and chasing discrepancies between CI and dev environments.
I encourage to try nix anybody if they didn't.
Nix is supported on MacOS.
I recently switched from Ubuntu to NixOs.
RPM hell and these noisy pop updates are history.

I had to touch versions to resolve version conflict.

@yaitskov yaitskov closed this Nov 16, 2025
@ivanperez-keera
Copy link
Member

ivanperez-keera commented Nov 16, 2025

If you want to put those files in a different repo, I would not be opposed to linking to that repo from our README.

I don't know if that's an acceptable practice in Nix / NixOS.

@yaitskov
Copy link
Author

I will keep them in the nix branch of my fork.
I think the link in README is not needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants