module 2.92.0-1 + nixpkgs 24.11 + nixos-generators = build failure in editline?? #58

Closed
opened 2025-03-24 19:52:12 +00:00 by zackw · 5 comments

Run this flake as nix run "path:${PWD}#vm":

{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.11";
    nixos-generators = {
      url = "github:nix-community/nixos-generators";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    lix-module = {
      url = "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0-1.tar.gz";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = { nixpkgs, nixos-generators, lix-module, ... }: {
    packages.x86_64-linux.vm = nixos-generators.nixosGenerate {
      format = "vm-nogui";
      system = "x86_64-linux";
      modules = [
        {
          nix.registry.nixpkgs.flake = nixpkgs;
          system.stateVersion = "24.11";
        }
        lix-module.nixosModules.default
      ];
    };
  };
}

and you should see this build failure:

error: builder for '/nix/store/7763k6fcrchprx9g7fibc4ddzqfybr1w-editline-1.17.1.drv' failed with exit code 1;
       last 23 log lines:
       > Running phase: unpackPhase
       > unpacking source archive /nix/store/ng2ljlas55wm30b3yriazqabj9p0pnia-source
       > source root is source
       > Running phase: patchPhase
       > applying patch /nix/store/80jn5n4dvbx01wggsqq04sxdnhyics61-fix-for-home-end-in-tmux.patch
       > patching file src/editline.c
       > applying patch /nix/store/qabqcjq9irxx887x1dnj9sk5ci7gxg6i-autoconf-2.72.patch
       > patching file configure.ac
       > Hunk #1 succeeded at 83 with fuzz 1 (offset -6 lines).
       > Hunk #2 succeeded at 94 (offset -6 lines).
       > applying patch /nix/store/ifc3a9bay8g0p78bcpnkxcm29vp97a0q-alt-left-alt-right-word-navigation.patch
       > patching file src/editline.c
       > applying patch /nix/store/qm45krrr5332f0pis8rawn8yqgaqqhkz-editline.patch
       > patching file src/editline.c
       > Reversed (or previously applied) patch detected!  Assume -R? [n]
       > Apply anyway? [n]
       > Skipping patch.
       > 3 out of 3 hunks ignored -- saving rejects to file src/editline.c.rej
       > patching file src/editline.c
       > Reversed (or previously applied) patch detected!  Assume -R? [n]
       > Apply anyway? [n]
       > Skipping patch.
       > 1 out of 1 hunk ignored -- saving rejects to file src/editline.c.rej
       For full logs, run 'nix log /nix/store/7763k6fcrchprx9g7fibc4ddzqfybr1w-editline-1.17.1.drv'.

followed by a flood of "error: 1 dependencies of derivation '[store path].drv' failed to build" messages.

(in case it takes a while for you to get to this, a flake.lock is attached.)

Run this flake as `nix run "path:${PWD}#vm"`: ```nix { inputs = { nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.11"; nixos-generators = { url = "github:nix-community/nixos-generators"; inputs.nixpkgs.follows = "nixpkgs"; }; lix-module = { url = "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0-1.tar.gz"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { nixpkgs, nixos-generators, lix-module, ... }: { packages.x86_64-linux.vm = nixos-generators.nixosGenerate { format = "vm-nogui"; system = "x86_64-linux"; modules = [ { nix.registry.nixpkgs.flake = nixpkgs; system.stateVersion = "24.11"; } lix-module.nixosModules.default ]; }; }; } ``` and you should see this build failure: ```none error: builder for '/nix/store/7763k6fcrchprx9g7fibc4ddzqfybr1w-editline-1.17.1.drv' failed with exit code 1; last 23 log lines: > Running phase: unpackPhase > unpacking source archive /nix/store/ng2ljlas55wm30b3yriazqabj9p0pnia-source > source root is source > Running phase: patchPhase > applying patch /nix/store/80jn5n4dvbx01wggsqq04sxdnhyics61-fix-for-home-end-in-tmux.patch > patching file src/editline.c > applying patch /nix/store/qabqcjq9irxx887x1dnj9sk5ci7gxg6i-autoconf-2.72.patch > patching file configure.ac > Hunk #1 succeeded at 83 with fuzz 1 (offset -6 lines). > Hunk #2 succeeded at 94 (offset -6 lines). > applying patch /nix/store/ifc3a9bay8g0p78bcpnkxcm29vp97a0q-alt-left-alt-right-word-navigation.patch > patching file src/editline.c > applying patch /nix/store/qm45krrr5332f0pis8rawn8yqgaqqhkz-editline.patch > patching file src/editline.c > Reversed (or previously applied) patch detected! Assume -R? [n] > Apply anyway? [n] > Skipping patch. > 3 out of 3 hunks ignored -- saving rejects to file src/editline.c.rej > patching file src/editline.c > Reversed (or previously applied) patch detected! Assume -R? [n] > Apply anyway? [n] > Skipping patch. > 1 out of 1 hunk ignored -- saving rejects to file src/editline.c.rej For full logs, run 'nix log /nix/store/7763k6fcrchprx9g7fibc4ddzqfybr1w-editline-1.17.1.drv'. ``` followed by a flood of "error: 1 dependencies of derivation '[store path].drv' failed to build" messages. (in case it takes a while for you to get to this, a flake.lock is attached.)

Exactly the same editline build failure here with nix-darwin, it seems the editline.patch is conflicting with previously applied patches. Related upstream pull request comment: https://github.com/NixOS/nixpkgs/pull/391426#issuecomment-2749729523

Full logs from nix log /nix/store/25m2mycza36bxpl56lgrmpklbpmz4ykf-editline-1.17.1.drv:

Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/ng2ljlas55wm30b3yriazqabj9p0pnia-source
source root is source
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
applying patch /nix/store/80jn5n4dvbx01wggsqq04sxdnhyics61-fix-for-home-end-in-tmux.patch
patching file src/editline.c
applying patch /nix/store/qabqcjq9irxx887x1dnj9sk5ci7gxg6i-autoconf-2.72.patch
patching file configure.ac
Hunk #1 succeeded at 83 with fuzz 1 (offset -6 lines).
Hunk #2 succeeded at 94 (offset -6 lines).
applying patch /nix/store/ifc3a9bay8g0p78bcpnkxcm29vp97a0q-alt-left-alt-right-word-navigation.patch
patching file src/editline.c
applying patch /nix/store/qm45krrr5332f0pis8rawn8yqgaqqhkz-editline.patch
patching file src/editline.c
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
3 out of 3 hunks ignored -- saving rejects to file src/editline.c.rej
patching file src/editline.c
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file src/editline.c.rej
Exactly the same `editline` build failure here with nix-darwin, it seems the `editline.patch` is conflicting with previously applied patches. Related upstream pull request comment: https://github.com/NixOS/nixpkgs/pull/391426#issuecomment-2749729523 Full logs from `nix log /nix/store/25m2mycza36bxpl56lgrmpklbpmz4ykf-editline-1.17.1.drv`: ``` Running phase: unpackPhase @nix { "action": "setPhase", "phase": "unpackPhase" } unpacking source archive /nix/store/ng2ljlas55wm30b3yriazqabj9p0pnia-source source root is source Running phase: patchPhase @nix { "action": "setPhase", "phase": "patchPhase" } applying patch /nix/store/80jn5n4dvbx01wggsqq04sxdnhyics61-fix-for-home-end-in-tmux.patch patching file src/editline.c applying patch /nix/store/qabqcjq9irxx887x1dnj9sk5ci7gxg6i-autoconf-2.72.patch patching file configure.ac Hunk #1 succeeded at 83 with fuzz 1 (offset -6 lines). Hunk #2 succeeded at 94 (offset -6 lines). applying patch /nix/store/ifc3a9bay8g0p78bcpnkxcm29vp97a0q-alt-left-alt-right-word-navigation.patch patching file src/editline.c applying patch /nix/store/qm45krrr5332f0pis8rawn8yqgaqqhkz-editline.patch patching file src/editline.c Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 3 out of 3 hunks ignored -- saving rejects to file src/editline.c.rej patching file src/editline.c Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored -- saving rejects to file src/editline.c.rej ```
Owner

Fixed in #59.

Workaround as a supplementary overlay:

(final: prev: {
    lix = prev.lix.override { editline-lix = prev.editline.overrideAttrs (old: { propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ final.ncurses ]; }); };
})

should do the job (or so). Please let me know if this is not enough.

Ideally, @jade, if you agree, I can tag a 2.92.0-2 once merged.

Fixed in #59. Workaround as a supplementary overlay: ``` (final: prev: { lix = prev.lix.override { editline-lix = prev.editline.overrideAttrs (old: { propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ final.ncurses ]; }); }; }) ``` should do the job (or so). Please let me know if this is not enough. Ideally, @jade, if you agree, I can tag a 2.92.0-2 once merged.
Owner

2.92.0-2 tagged, this is fixed now.

2.92.0-2 tagged, this is fixed now.
raito closed this issue 2025-03-25 17:55:22 +00:00

I notice the stable branch is still pointing to 2.92.0-1; could that be updated for those of us trying to avoid manual updates?

I notice the `stable` branch is still pointing to 2.92.0-1; could that be updated for those of us trying to avoid manual updates?

Ah, though I'm reading on #39 that the stable branch is not actually designed for this and the intended is to just pin the version number until there's a better process in place

Ah, though I'm reading on #39 that the `stable` branch is not actually designed for this and the intended is to just pin the version number until there's a better process in place
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/nixos-module#58
No description provided.