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

Add a package for ble.sh #160857

Closed
wants to merge 5 commits into from
Closed

Add a package for ble.sh #160857

wants to merge 5 commits into from

Conversation

gi-yt
Copy link

@gi-yt gi-yt commented Feb 19, 2022

Add a package for ble.sh

Motivation for this change

Add a package for ble.sh, a bash line editor that provides fish-like completions for the bash shell

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 22.05 Release Notes (or backporting 21.11 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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Feb 19, 2022
pname = "blesh";
version = "0.3.3";

src = fetchgit {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could use fetchFromGitHub.


src = fetchgit {
url = "https://github.com/akinomyoga/ble.sh.git";
rev = "398e404d624ef6365d9175882e24f6e180d8b6b2";
Copy link
Contributor

Choose a reason for hiding this comment

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

For version 0.3.3 this could be "v${version}", but the listed revision is not actually a tagged version and so the version number should probably reflect that (i.e. version = "0.4.0_devel3.398e404"; or something.)

rev = "398e404d624ef6365d9175882e24f6e180d8b6b2";
sha256 = "09i6a45lcd8gb0397hcffwsc5fqam8f7wk2yw9qgjjrb7i9n1235";
};
configurePhase = ''
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps makeFlags = [ "--assume-old=contrib/.git" ]; instead.

configurePhase = ''
mkdir contrib/.git
'';
installPhase = ''
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not just installFlags = [ "INSDIR=$(out)" ];?

longDescription = "A full-featured line editor written in pure Bash with Syntax highlighting, auto suggestions, vim modes, etc. in Bash interactive sessions!";
license = licenses.bsd3;
maintainers = with maintainers; [ aryak ];
platforms = platforms.linux;
Copy link
Contributor

Choose a reason for hiding this comment

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

I would have thought that ble.sh would be portable?

Copy link
Author

Choose a reason for hiding this comment

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

i have not tested it on macos. so i have mentioned just linux... if someone can confirm that it works on macos i would add it too.

mv out/doc $out/share/doc/blesh
mv out $out/share/blesh
'';

Copy link
Contributor

Choose a reason for hiding this comment

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

I would find it useful to add the ble.sh shell script to PATH, if that is still acceptable even though it is not an executable. This would do it:

preFixup = ''
  mkdir $out/bin
  cat >$out/bin/ble.sh <<EOF
  source $out/ble.sh
  EOF
'';

rev = "398e404d624ef6365d9175882e24f6e180d8b6b2";
sha256 = "09i6a45lcd8gb0397hcffwsc5fqam8f7wk2yw9qgjjrb7i9n1235";
};
configurePhase = ''
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the dependency on gawk be explicit?, i.e. buildInputs = [ gawk ];.

@gi-yt
Copy link
Author

gi-yt commented Apr 26, 2022

Hey, couldn't check the stuff as i lost access to my github account for a while. I will fix everything tommorow. Thanks for reviewing!

@aiotter aiotter mentioned this pull request Jul 18, 2022
13 tasks
@SuperSandro2000
Copy link
Member

closing in favor of #181963

@Janik-Haag Janik-Haag added the 12. first-time contribution This PR is the author's first one; please be gentle! label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux 12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants