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

nixos/fish: fix completions patch #80456

Merged
merged 1 commit into from Feb 20, 2020
Merged

nixos/fish: fix completions patch #80456

merged 1 commit into from Feb 20, 2020

Conversation

cole-h
Copy link
Member

@cole-h cole-h commented Feb 18, 2020

Motivation for this change

Upstream decided to split the lines we were patching out, so the patch
would fail.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Fix #80423 (hopefully). cc @terlar -- could you test this? I don't have an easy way to test this on NixOS, currently.

Upstream decided to split the lines we were patching out, so the patch
would fail.
@GTrunSec
Copy link
Contributor

GTrunSec commented Feb 19, 2020

it's build failed.

@cole-h
Copy link
Member Author

cole-h commented Feb 19, 2020

@GTrunSec Could you please post the logs here/somewhere? Otherwise, I can't do anything more to try and fix this.

EDIT: The fact that it succeeded for @terlar makes me think either 1) you were just agreeing that this is a problem or 2) you didn't apply this properly (I don't know what the proper way is either, though, which is why I was unable to test it myself).

@terlar
Copy link
Contributor

terlar commented Feb 19, 2020

Weird, for me it worked.

@GTrunSec
Copy link
Contributor

Weird, for me it worked.

yeh, it' worked.

DIT: The fact that it succeeded for @terlar makes me think either 1) you were just agreeing that this is a problem or 2) you didn't apply this properly (I don't know what the proper way is either, though, which is why I was unable to test it myself).

sorry, when I deleted the building garbage, it worked for me.

@cole-h
Copy link
Member Author

cole-h commented Feb 19, 2020

No worries, glad it worked! Thanks for trying it out and reporting back :)

@terlar
Copy link
Contributor

terlar commented Feb 19, 2020

Who is the owner for this module? Or someone that could make a decision to merge this, feels safe, and won't break stuff more than they currently are on master : )

@jtojnar
Copy link
Contributor

jtojnar commented Feb 20, 2020

Repro:

echo '{ ... }: { programs.fish.enable = true; }' > fish-fail.nix
nixos-rebuild build-vm -I nixpkgs=$HOME/Projects/nixpkgs -I nixos-config=fish-fail.nix

If you cannot wait for the nixos-rebuild to finish, just look for something like

these derivations will be built:
  /nix/store/zj2n12p41jrmifr8rrz2af0rzdw5kcvh-fish_patched-completion-generator.drv

in the output and run nix-build /nix/store/zj2n12p41jrmifr8rrz2af0rzdw5kcvh-fish_patched-completion-generator.drv.

Copy link
Contributor

@jtojnar jtojnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can confirm it fixes the build. Thanks.

@jtojnar jtojnar merged commit c1b45ef into NixOS:master Feb 20, 2020
@cole-h cole-h deleted the fish branch February 20, 2020 07:21
@shyim
Copy link
Member

shyim commented Feb 20, 2020

I am not sure, but it seems fish installing does not work more.

unpacking sources
unpacking source archive /nix/store/z08mbgrf14gvv13i1hcw8wwjicdgn3k2-fish-3.1.0/share/fish/tools/create_manpage_completions.py
unpacking source archive /nix/store/z08mbgrf14gvv13i1hcw8wwjicdgn3k2-fish-3.1.0/share/fish/tools/deroff.py
source root is .
patching sources
applying patch /nix/store/r2bsz0sgmxjsm7jvcpmc0z113wfvfnkj-fish_completion-generator.patch
patching file create_manpage_completions.py
Hunk #1 FAILED at 776.
1 out of 1 hunk FAILED -- saving rejects to file create_manpage_completions.py.rej

That's the same edited file in this PR 🤔

@cole-h
Copy link
Member Author

cole-h commented Feb 20, 2020

You'll have to update your nixpkgs channel in order to get the fix. It was just merged yesterday, so you're probably still on an older revision. The most telltale sign of that is the patch fails at line 776 -- the updated patch is starts much later, at line 844.

@pmiddend
Copy link
Contributor

I'm using the latest unstable (commit e2b4abe) and I'm getting the same error.

@cole-h
Copy link
Member Author

cole-h commented Feb 20, 2020

If you view the tree at that commit, you can see that this PR has not yet been incorporated: https://github.com/NixOS/nixpkgs/blob/e2b4abe3c8f2e09adfc6a52007841d1b96c89371/nixos/modules/programs/fish_completion-generator.patch.

This means that the commit fixing this is only present on the master branch, and is not on any channels yet. I don't use NixOS, so I cannot give you any other solution than to switch to master until this PR has found its way into nixos-unstable.

@pmiddend
Copy link
Contributor

@cole-h Alright, thanks for clarifying. I was a little confused by your hint to "update the channel", since it was already updated. But it's fine, I'll simply wait a bit. :)

@cole-h
Copy link
Member Author

cole-h commented Feb 20, 2020

I could have been a little clearer, sorry ;) It made sense to me because my nixpkgs channel is tracking master. Hopefully nixos-unstable gets bumped sooner rather than later, so you no longer have to deal with this issue!

@cole-h
Copy link
Member Author

cole-h commented Feb 22, 2020

Just a little update: according to https://howoldis.herokuapp.com/, nixos-unstable has advanced to ea79a830dcf, whose tree includes this patch 🎉

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.

nixos/modules/programs/fish: completion generator patch does not work with fish 3.1.0 package
6 participants