Skip to content

Builds fail with (lang dune 3.17) #115

Open
@henrytill

Description

@henrytill

Describe the bug
When dune-project contains (lang dune 3.17), builds fail with:

error: builder for '/nix/store/6i5di8cfaxp8fjzh0xp177l5zfkiphip-repro-dev.drv' failed with exit code 1;
       last 12 log lines:
       > Running phase: unpackPhase
       > unpacking source archive /nix/store/yr0mkpxm5bpzi33br6q6jf0gb7dd8m49-01klbdnhwh0s9j5km1pnb030px9angz5-bk9izj5svxgyvcmmvjhcjc0wfazifacn-source
       > source root is 01klbdnhwh0s9j5km1pnb030px9angz5-bk9izj5svxgyvcmmvjhcjc0wfazifacn-source
       > Running phase: patchPhase
       > Running phase: updateAutotoolsGnuConfigScriptsPhase
       > Running phase: configurePhase
       > patching script interpreter paths in .
       > Running phase: buildPhase
       > File "repro.opam", line 1, characters 10-25:
       > 1 | # This file is generated by dune, edit dune-project instead
       >               ^^^^^^^^^^^^^^^
       > Error: repository does not contain any version information
       For full logs, run 'nix-store -l /nix/store/6i5di8cfaxp8fjzh0xp177l5zfkiphip-repro-dev.drv'.

To Reproduce

dune init proj repro
cd repro
dune build @all
nix flake init -t github:tweag/opam-nix
sed -i 's/throw "Put the package name here!"/"repro"/' flake.nix
nix build # fails
sed -i 's/3.17/3.16/' dune-project 
nix build # succeeds

Expected behavior
Build succeeds.

Environment

$ uname -a
Linux thalassa 6.12.12-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.12-1 (2025-02-02) x86_64 GNU/Linux
$ dune --version
3.17.2
$ nix --version
nix (Nix) 2.25.3

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