Open zmrocze opened 5 months ago
Found that you guys (iog i mean) have hit this problem yourself, exactly that problem:
Which is good because i have a fix.
But also a second time that bug is discovered.
The bug is arguably in agda
, in that it does not build properly when using per-component builds.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This template is a guide only, feel free add or omit sections as appropriate.
Describe the bug
Using:
Haskell source code version locked at:
Haskell.nix, system, ghc versions locked at:
I want to build the package from 1. with haskell.nix. I take it as input in the flake 2. and build it in the most usual way with haskell.nix, see 2.. Running stack build in 1. succeeds but haskell.nix build fails.
Steps To Reproduce
Run
nix build github:zmrocze/agda-language-server.nix\?ref=4a8d0beca0c734d2692c4887858ae3438a6ce072
and observe fail to build, by a failing build of a dependency. You will see something like:
Now go to repository 1. The package there builds with stack but it needs some packages in path when building the final package "agda-language-server". Therefore I provide
shell.nix
and instruct stack to use these deps withnix: ...
lines instack.yaml
. Enter the nix shell and runstack build
:nix-shell -c "stack build"
. The build succeeds.The dependency on agda-lib-agda which fails when building with haskell.nix, builds with stack or is provided from snapshot. Therefore haskell.nix does something incompatible with to
stack build
.Important: Note that eventhough for the stack build to succeed I need the nix shell - The haskell.nix fails earlier (when building
agda-lib
dependency). Therefore I cannot even get to debugging theagda-language-server
build, because haskell.nix does something else than stack. Otherwise overridingbuildInputs
of my derivation with the packages needed in theshell.nix
would likely fix the problem.Expected behavior
The package builds with haskell.nix. Or it fails at building the package
agda-language-server
and I can fix the build by overriding the derivationsbuildInputs
- to mimick enteringshell.nix
in 1. before runningstack build
.