Nix build problem

40 views
Skip to first unread message

jonas.cl

unread,
Sep 24, 2024, 9:13:13 AM9/24/24
to Idris Programming Language
Hi,
I've been experimenting with the Nix templates to figure out how to build an Idris2 project with Nix flakes. I've managed to build projects with and without dependencies, but when I add a dependency to Idris2 itself I get the following error that I haven't been able to figure out. I'm not skilled enough in Nix to work it out myself apparently. Does anyone have an idea?

I've created a repo that shows the bug, https://github.com/mokshasoft/idris2-nix-pkgDeps/tree/idris2-dependency-bug. The last commit adds a dependency to github:idris-lang/Idris2 which creates the error shown below. The file src/IdrisPaths.idr is generated by the Idris2 build, but when I add a dependency to idris2 in my test project then this file fails to get generated. I've tried preBuild sections and other things but I'm stuck atm. Any help would be appreciated.

Kind regards
Jonas

error: builder for '/nix/store/5fp74g5khcdnwhqaj8mfvpbl6kp7ixb8-idris2-unversioned.drv' failed with exit code 1;
       last 10 log lines:
       >  97/281: Building Libraries.Data.Version (src/Libraries/Data/Version.idr)
       > Error: Module IdrisPaths not found
       >
       > Idris.Version:4:1--4:18
       >  1 | ||| Sets and display version of Idris.
       >  2 | module Idris.Version
       >  3 |
       >  4 | import IdrisPaths
       >      ^^^^^^^^^^^^^^^^^
       >
       For full logs, run 'nix-store -l /nix/store/5fp74g5khcdnwhqaj8mfvpbl6kp7ixb8-idris2-unversioned.drv'.
error: 1 dependencies of derivation '/nix/store/ig34m46h1p6mrfh263lqfn583380iayn-pkgWithDeps-unversioned.drv' failed to build

[nixos@nixos:~/Repo/OpenSource/Idris2/idris2-nix-pkgDeps]$ nix-store -l /nix/store/5fp74g5khcdnwhqaj8mfvpbl6kp7ixb8-idris2-unversioned.drv
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/fmmfzamhv7f1bmxp3hcyqi0g0h0yjiw4-source
source root is source
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
no configure script, doing nothing
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
  1/281: Building Libraries.Data.String.Extra (src/Libraries/Data/String/Extra.idr)
.....
 96/281: Building Core.Binary (src/Core/Binary.idr)
 97/281: Building Libraries.Data.Version (src/Libraries/Data/Version.idr)
Error: Module IdrisPaths not found

Idris.Version:4:1--4:18
 1 | ||| Sets and display version of Idris.
 2 | module Idris.Version
 3 |
 4 | import IdrisPaths
     ^^^^^^^^^^^^^^^^^


Sent from ProtonMail, Swiss-based encrypted email.
Reply all
Reply to author
Forward
0 new messages