-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
babelfish: init at 0.1.3 #108946
babelfish: init at 0.1.3 #108946
Conversation
4710a07
to
68440b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a few remarks.
Let's also ping the author of the program: @bouk (#107834 (comment))
pkgs/shells/fish/plugins/default.nix
Outdated
@@ -2,6 +2,8 @@ | |||
|
|||
lib.makeScope newScope (self: with self; { | |||
|
|||
babelfish = callPackage ./babelfish.nix { }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this can be used as a standalone executable, this probably belongs to the top level instead of the fishPlugins
scope.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed; it felt a little weird as a plugin. I'll make this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would you recommend for the path of the package? pkgs/shells/fish/babelfish.nix
or something else? pkgs/tools/misc/
or similar?
@@ -0,0 +1,22 @@ | |||
{ lib, stdenv, buildGoModule, fetchFromGitHub }: | |||
buildGoModule rec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The source of babelfish
also includes a babel.fish
file which I believe should be installed to $out/share/fish/vendor_functions.d/
(to check).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not suggest we do that by default, since it overrides the source
function. babel.fish is mostly a proof of concept and not something I'd suggest people actually use.
(I'm the creator of babelfish)
description = "Translate bash scripts to fish"; | ||
homepage = "https://github.com/bouk/babelfish"; | ||
license = licenses.mit; | ||
maintainers = [ maintainers.kevingriffin ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can add maintainers.bouk here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maintainers = [ maintainers.kevingriffin ]; | |
maintainers = with maintainers; [ bouk kevingriffin ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do. Thank you!
@kevingriffin Please add yourself in maintainers/maintainer-list.nix. Check the comment at the top of the file. You can do it within this PR. |
{ lib, stdenv, buildGoModule, fetchFromGitHub }: | ||
buildGoModule rec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ lib, stdenv, buildGoModule, fetchFromGitHub }: | |
buildGoModule rec { | |
{ lib, stdenv, buildGoModule, fetchFromGitHub }: | |
buildGoModule rec { |
maintainers = [ maintainers.kevingriffin ]; | ||
}; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One extra new line to much.
68440b7
to
d93fba2
Compare
29a5c0d
to
d09b024
Compare
This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch) Result of 1 package built:
|
This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch) Result of 1 package built:
|
d09b024
to
8d0ddfc
Compare
Motivation for this change
The babelfish package allows for translation of bash to fish, useful when setting up an environment or otherwise dealing with typical shell scripts. I've added it to support the generation of native fish shell setup for nixOS.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)