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

aptly: add bash completion #21046

Merged
merged 1 commit into from Dec 12, 2016
Merged

Conversation

montag451
Copy link
Contributor

Motivation for this change
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 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.

goPackagePath = "github.com/smira/aptly";
goDeps = ./deps.nix;

nativeBuildInputs = [ makeWrapper ];

postInstall = ''
rm $bin/bin/man
mkdir -p $out/etc/bash_completion.d
ln -s ${aptlyCompletionSrc}/aptly $out/etc/bash_completion.d
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you change to $out/share/bash-completion/completions/ please as it's more common, also look: #21053 currently installing this package on nixos would not include bash completions, as for go packages only bin is installed by default, we need something like completions output, i'm also facing the same problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you change to $out/share/bash-completion/completions/ please as it's more common

Sure, I will update my pull request

currently installing this package on nixos would not include bash completions

Are you sure about that? When I install the package on NixOS the completion is working.

mkdir -p $out/etc/bash_completion.d
ln -s ${aptlyCompletionSrc}/aptly $out/etc/bash_completion.d
mkdir -p $out/share/bash-completion/completions
ln -s ${aptlyCompletionSrc}/aptly $out/share/bash-completion/completions
Copy link
Contributor

Choose a reason for hiding this comment

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

Based on discussion here: #21053 completions should go to bin output, so please change to $bin/share/bash-completion/completions/. I'm sorry for confusion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm sorry for confusion

No problem 😀

please change to $bin/share/bash-completion/completions/

I made the change you requested and I squashed all the commits into one.

Copy link
Contributor

Choose a reason for hiding this comment

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

Tnx!

@offlinehacker offlinehacker merged commit c1cbe26 into NixOS:master Dec 12, 2016
@montag451 montag451 deleted the aptly-completion branch December 12, 2016 19:48
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

2 participants