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
chruby-fish: init at 0.8.2 #94345
chruby-fish: init at 0.8.2 #94345
Conversation
|
||
meta = { | ||
description = "Thin wrapper around chruby to make it work with the Fish shell"; | ||
homepage = "https://github.com/JeanMertz/chruby-fish"; |
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.
Doesn't that means that you should wrap this with chruby?
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 mean something like installing both chruby and fish automatically enables chruby-fish? I don't know how to achieve that...
With curent implementation, we can at least use chruby-fish without wrapping by
nix-env --install fish chruby chruby-fish
- write some config like here
I mean installing chruby-fish means chruby is also added
…On July 31, 2020 11:09:10 PM GMT+03:00, TANIGUCHI Kohei ***@***.***> wrote:
@cohei commented on this pull request.
> + pname = "chruby-fish";
+
+ version = "0.8.2";
+
+ src = fetchFromGitHub {
+ owner = "JeanMertz";
+ repo = "chruby-fish";
+ rev = "v${version}";
+ sha256 = "15q0ywsn9pcypbpvlq0wb41x4igxm9bsvhg9a05dqw1n437qjhyb";
+ };
+
+ installFlags = [ "PREFIX=$(out)" ];
+
+ meta = {
+ description = "Thin wrapper around chruby to make it work with the Fish shell";
+ homepage = "https://github.com/JeanMertz/chruby-fish";
You mean something like installing both chruby and fish automatically enables chruby-fish? I don't know how to achieve that...
With curent implementation, we can at least use chruby-fish without wrapping by
1. `nix-env --install fish chruby chruby-fish`
1. write some config like [here](https://github.com/cohei/dotfiles/blob/cf1d6cb9a20633e4646cbc983e63283d108cedf8/home/.config/fish/config.fish#L29-L31)
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#94345 (comment)
|
That is convenient but not necessary to install chruby-fish. So I attempted to keep dependencies minimum. For example, when someone is using both chruby and chruby-fish for bash and fish respectively, this may avoid trouble. |
ehm, I meant that you can add chruby to chruby-fish path. there will be no chruby in shell path. |
Like 6039f5e ? |
Nope. Like this: https://github.com/NixOS/nixpkgs/blob/master/pkgs/misc/emulators/mednaffe/default.nix#L21 Add makeWrapper to your buildInputs, and run |
Thank you for the example! I'll try. |
Is there anything else I can do? |
Sorry for everything you've already been through to merge the stuff
Initially I thought that's an utility which uses chruby as a dependency, but turns out that's more of a shell extension. So probably you don't even need to do that. I will pull PR in a sec and poke around a bit. |
Result of 1 package built:
|
I read a bit more. Turns out, chruby is a script itself, and doesn't pull whole ruby with itself) Although it's totally fine as a package, it still requires CHRUBY_ROOT environment variable. It would be nice to set it inside auto.fish and chruby.fish on patchPhase. |
diff --git a/pkgs/development/tools/misc/chruby-fish/default.nix b/pkgs/development/tools/misc/chruby-fish/default.nix
index b8acc475204..8e552b4a9a5 100644
--- a/pkgs/development/tools/misc/chruby-fish/default.nix
+++ b/pkgs/development/tools/misc/chruby-fish/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchFromGitHub }:
+{ stdenv, lib, fetchFromGitHub, chruby }:
stdenv.mkDerivation rec {
pname = "chruby-fish";
@@ -12,6 +12,11 @@ stdenv.mkDerivation rec {
sha256 = "15q0ywsn9pcypbpvlq0wb41x4igxm9bsvhg9a05dqw1n437qjhyb";
};
+ postInstall = ''
+ sed -i -e '1cset CHRUBY_ROOT ${chruby}' $out/share/chruby/auto.fish
+ sed -i -e '1cset CHRUBY_ROOT ${chruby}' $out/share/chruby/chruby.fish
+ '';
+
installFlags = [ "PREFIX=$(out)" ];
meta = {
I can't edit your PR, so here's a patch) |
@cohei ? |
b848278
to
4120a18
Compare
Never mind! Thanks to the detour, I understand Nix more than before. |
Also, you can post this PR here, and there will be contributors with merge flag |
They say
Could you post it there instead, if you don't mind? |
Np, didn't know about this)
…On September 30, 2020 7:54:47 AM GMT+03:00, TANIGUCHI Kohei ***@***.***> wrote:
They say
> Select an open pull request that is not your own
Could you post it there instead, if you don't mind?
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#94345 (comment)
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
8cfb4ae
to
ec0f69b
Compare
Motivation for this change
Add chruby-fish to nixpkgs.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
Tested execution of all binary files (usually inno binary files./result/bin/
)nix path-info -S
before and after)