Skip to content

fzf: Include fzf shell scripts in output #27058

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

Merged
merged 1 commit into from
Jul 3, 2017

Conversation

Nadrieril
Copy link
Member

Motivation for this change

fzf provides some useful shell scripts to setup key bindings and completion for various shells (https://github.com/junegunn/fzf/tree/master/shell).
Those scripts were previously unaccessible from the built package.

This PR makes those scripts accessible from ${fzf.out}/share/shell, alongside the vim plugin.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Sorry, something went wrong.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@@ -39,6 +39,7 @@ buildGoPackage rec {
cp -r $src/man/man1 $man/share/man
mkdir -p $out/share/vim-plugins
ln -s $out/share/go/src/github.com/junegunn/fzf $out/share/vim-plugins/${name}
cp -R $src/shell $out/share/shell
Copy link
Contributor

Choose a reason for hiding this comment

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

"$src"

Copy link
Member Author

Choose a reason for hiding this comment

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

Could you not be a dick and make a sentence please ?

@Mic92 Mic92 merged commit 40c6f7e into NixOS:master Jul 3, 2017
@Mic92
Copy link
Member

Mic92 commented Jul 3, 2017

Note that .out also contains the source code, which is probably not wanted by most users. There might be a different locations more suitable: https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/fzf#n51

@Nadrieril Nadrieril deleted the fzf-shell-scripts branch July 6, 2017 18:37
binarin pushed a commit to binarin/nixpkgs that referenced this pull request Jul 28, 2017

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
So that helper scripts can be easily sourced in interactive shell
configuration. `autojump` package was already present and had the same
requirements for findind a `share` folders, so I took an inspiration
there.

I beleive this is a better alternative to:
- NixOS#25080
- NixOS#27058

Replacing `$out/share/shell` with `$bin/share/fzf` was necessary to
prevent dependency loop in produced derivations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants