Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

editline: recognize Alt-Left/Alt-Right on more platforms #391426

Merged
merged 1 commit into from
Mar 20, 2025

Conversation

9999years
Copy link
Contributor

This applies a merged but not released patch from upstream (editline has not cut a release since 2020).

See: troglobit/editline#70

I recently submitted this change just scoped to the Lix package. Since then, the patch has been merged upstream, so I believe it's now appropriate for inclusion in the whole package set.

See: #341131

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

This applies a merged but not released patch from upstream (`editline`
has not cut a release since 2020).

See: troglobit/editline#70
See: NixOS#341131
@lf- lf- merged commit e833458 into NixOS:master Mar 20, 2025
27 checks passed
@9999years 9999years deleted the editline branch March 20, 2025 20:08
@9999years 9999years mentioned this pull request Mar 20, 2025
14 tasks
@9999years 9999years added the backport release-24.11 Backport PR automatically label Mar 22, 2025
@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented Mar 22, 2025

Successfully created backport PR for release-24.11:

@evysgarden
Copy link
Contributor

evysgarden commented Mar 25, 2025

this patch results in an error on nixos-24.11 with the lix nixos module

nix log output

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

applying following overlay (ignoring the patch) seems to fix it:

(next: prev: {
  editline = prev.editline.overrideAttrs (oldAttrs: {
    patches = next.lib.lists.take 2 oldAttrs.patches;
  });
})

@apisashla
Copy link

apisashla commented Mar 25, 2025

appreciate the comment evysgarden, have been trying to figure out the build error but am putting in place your quick fix for now as I can't make heads nor tails of it - I did see a git issue on the lix end referencing the same patch, so I think lix's older merge of the same patch may conflict with nixpkgs upstream's more recent merge.

@9999years
Copy link
Contributor Author

9999years commented Mar 25, 2025

@apisashla Yeah, this is an issue with the Lix NixOS module, should be fixed here: https://gerrit.lix.systems/c/lix/+/2865

@lf-
Copy link
Member

lf- commented Mar 25, 2025

plus in an upcoming module release, likely called 2.92.0-2

@apisashla
Copy link

Thanks for the clarification and quick response! Also for developing lix in general.

@RaitoBezarius
Copy link
Member

We just tagged 2.92.0-2 FWIW!

1 similar comment
@RaitoBezarius
Copy link
Member

We just tagged 2.92.0-2 FWIW!

@afh
Copy link
Member

afh commented Mar 25, 2025

I'm using lix with in a flake based setup on darwin using nix-darwin, but I'm unsure where to apply the overlay. Can someone point me to an example, that provides a bit more context?

@RaitoBezarius
Copy link
Member

You can just upgrade the lix-module to 2.92.0-2 and you do not need to apply any overlay now.

@afh
Copy link
Member

afh commented Mar 25, 2025

Works like a charm! Much obliged, @RaitoBezarius 🙂

@evysgarden
Copy link
Contributor

evysgarden commented Mar 25, 2025

You can just upgrade the lix-module to 2.92.0-2 and you do not need to apply any overlay now.

lix-project/nixos-module/archive/2.92.0-2 seems to be broken now for nixosModules.lixFromNixpkgs.

I get the following error on evalutaion

error:
       … while evaluating an expression to select 'drvPath' on it
         at «internal»:1:552:
       … while calling the 'derivationStrict' builtin
         at «internal»:1:208:
       (stack trace truncated; use '--show-trace' to show the full trace)

       error: function 'anonymous lambda' called with unexpected argument 'editline-lix'
       at /nix/store/sr3gj4wcx3kwy0q5gcxl49ja733bqm7b-source/pkgs/tools/package-management/lix/common.nix:19:1:
           18| assert (hash == null) -> (src != null);
           19| {
             | ^
           20|   stdenv,

I don't really use that output so not sure whether it was broken before already or not.


thank you btw for reacting so quickly <3 hope this is not causing any stress and u get enough sleep

@RaitoBezarius
Copy link
Member

You can just upgrade the lix-module to 2.92.0-2 and you do not need to apply any overlay now.

lix-project/nixos-module/archive/2.92.0-2 seems to be broken now for nixosModules.lixFromNixpkgs.

I get the following error on evalutaion

error:
       … while evaluating an expression to select 'drvPath' on it
         at «internal»:1:552:
       … while calling the 'derivationStrict' builtin
         at «internal»:1:208:
       (stack trace truncated; use '--show-trace' to show the full trace)

       error: function 'anonymous lambda' called with unexpected argument 'editline-lix'
       at /nix/store/sr3gj4wcx3kwy0q5gcxl49ja733bqm7b-source/pkgs/tools/package-management/lix/common.nix:19:1:
           18| assert (hash == null) -> (src != null);
           19| {
             | ^
           20|   stdenv,

I don't really use that output so not sure whether it was broken before already or not.

thank you btw for reacting so quickly <3 hope this is not causing any stress and u get enough sleep

Thank you for the report: https://git.lix.systems/lix-project/nixos-module/pulls/60 — the fix is out there. I will tag a 2.92.0-3 ASAP :-).

@evysgarden
Copy link
Contributor

damn you fast

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

Successfully merging this pull request may close these issues.

6 participants