[Nix-dev] [newbie] ruby gem pkgs - bundler, bundler/setup

Peter Schuller peter.schuller at infidyne.com
Thu Feb 18 06:20:39 CET 2016


Returning to this a little bit, I can at least confirm that the
conflict problem happens in an environment entirely unrelated to my
attempt to package asciidoctor. Simply running (in this case on
Ubuntu):

   nix-env -i lolcat gist

Ends up failing due to the same bundle collision:

   https://gist.github.com/scode/873f60c7f69e0da98734

I picked those two because I just wanted to try any two packages that
use the same packaging mechanism; discovered by finding packages with
a gemset.nix file.

Is it fair to say this is a real problem with the Ruby packaging infra
in Nix right now, or am I missing something?

On Wed, Feb 3, 2016 at 11:15 PM, Peter Schuller
<peter.schuller at infidyne.com> wrote:
> Hi,
>
> I'm attempting to add asciidoctor (http://asciidoctor.org/) to
> nixpkgs. I'm following the instructions at:
>
>    https://nixos.org/nixpkgs/manual/#sec-language-ruby
>
> with one deviation - I removed the source URL directive added by
> bundix, based on the fact that nix complained about syntax and that
> other gemspecs in nixpkgs don't have it (e.g., tools/misc/lolcat).
>
> After that I have two problems.
>
> The first is that bundler ends up in bin (and thus in the user's PATH).
>
> I noticed this as I was installing lolcat without having uninstalled
> my work-in-progress package - and it failed due to bundler being a
> conflict in bin:
>
>    https://gist.github.com/scode/70bce8856634b23bbeda
>
> Even assuming I did something wrong with asciidoc, the fact remains
> that lolcat wants to expose bundler as a binary provided by it! From
> my understanding, this seems wrong since it would make lolcat and
> other packages using the same mechanism mutually exclusive. I am
> probably missing something, but that's why I'm confused.
>
> The second problem is that once I have my package installed, it fails
> to run with:
>
>    https://gist.github.com/scode/c9ef2d698a04db8e5739
>
> While the immediate cause of the problem is obvious, it's not obvious
> to me, as a newbie to nixpkgs, what the root cause is or how the
> mechanisms all fit together to try to ensure that bundler/setup is
> visible to require at that point, and how my package is different than
> lolcat to cause this problem.
>
> My attempted package is here:
>
>   https://github.com/scode/nixpkgs/commit/d8798469d036c1cd6d758836b0e02fe1008b4baf
>
>
> --
> / Peter Schuller (@scode, http://worldmodscode.wordpress.com)



-- 
/ Peter Schuller (@scode, http://worldmodscode.wordpress.com)


More information about the nix-dev mailing list