Re: [Nix-dev] How to package Heroku Toolbelt?

2013-11-18 Thread Alex Berg
Thanks for the idea Jonas. I gave it a try, and I finally got it working. But, I encountered some problems on the way, so I want to ask here. I am using Ruby 1.9, which includes Rubygems out-of-the-box, I believe. $ gem install heroku ERROR: While executing gem ...

Re: [Nix-dev] How to package Heroku Toolbelt?

2013-11-18 Thread Jonas Pfenniger (zimbatm)
What's the output of `gem env` if you unset the GEM_HOME that you have exported ? Normally you should have $HOME/.gem/ruby/1.9.1 in your gem paths and `gem install --user-install your-gem` should place it there. You still have to add $HOME/.gem/ruby/1.9.1/bin in your PATH. Later versions of

Re: [Nix-dev] How to package Heroku Toolbelt?

2013-11-18 Thread Vladimír Čunát
On 11/18/2013 12:17 PM, Jonas Pfenniger (zimbatm) wrote: Regarding readline, it seems that it's only compiled if a cursesSupport flag is enabled : https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/interpreters/ruby/ruby-19.nix#L5 but I don't know how to compile ruby with it or not

Re: [Nix-dev] How to package Heroku Toolbelt?

2013-11-18 Thread Alex Berg
Yes --user-install option[1] will install Gems into my home directory. (Related: Bundler can also do this, with the --path option. [2]) But, should storing gems in Home directory be the default behavior for Ruby on NixOS? If so, we should configure this when installing Ruby or Rubygems. We I see

Re: [Nix-dev] How to package Heroku Toolbelt?

2013-11-18 Thread Alex Berg
Thanks Vlad! I added the following attribute in the `top-level/all-packages.nix` file, right below the `ruby` attribute. rubyCurses = ruby.override { cursesSupport = true; }; Then I reinstalled Ruby and found success. Nice! $ nix-env --uninstall ruby $ nix-env --uninstall rubygems

Re: [Nix-dev] How to package Heroku Toolbelt?

2013-11-18 Thread Vladimír Čunát
On 11/19/2013 01:38 AM, Alex Berg wrote: Vlad, is rubycurses intended as a new attribute in all-packages.nix, sibling to ruby? Yes, if could be if it's likely to be useful on more places, or it could be the default. Or it could e.g. be herokuToolbelt = callPackage path { ruby =

Re: [Nix-dev] How to package Heroku Toolbelt?

2013-11-17 Thread Jonas Pfenniger (zimbatm)
Alternatively you could also just install the heroku and the foreman gem for the same effect. The toolbelt is really just a distribution of these gems with a bundled ruby interpreter, it's principally meant for OSes with a broken package management like OSX and Windows (they want to avoid support

[Nix-dev] How to package Heroku Toolbelt?

2013-11-14 Thread Alex Berg
How do I package the Heroku Toolbelt? - https://toolbelt.heroku.comhttps://toolbelt.heroku.com/install.sh It looks like the Ubuntu installer includes Ruby and some other stuff, so I think I should just package the Standalone option. This option tells me to download and run a shell script -

Re: [Nix-dev] How to package Heroku Toolbelt?

2013-11-14 Thread Vladimír Čunát
On 11/14/2013 10:44 AM, Alex Berg wrote: [chexxor@nixos:~]$ nix-build /my-sources/pkgs/top-level/all-packages.nix -A heroku-toolbelt these derivations will be built: /nix/store/226khb1zh9kb94wwc27as2kxiyrqmqkj-heroku-toolbelt.drv building path(s)

Re: [Nix-dev] How to package Heroku Toolbelt?

2013-11-14 Thread Alex Berg
Excellent! I've got it working now. For the curious ones, I pasted my successful package below. Now, another question. After I install the Heroku Toolbelt, the `heroku` command is available on the command-line. But, I can't run it because I haven't installed Ruby. Question 4: Is there some way

Re: [Nix-dev] How to package Heroku Toolbelt?

2013-11-14 Thread Vladimír Čunát
On 11/15/2013 06:34 AM, Alex Berg wrote: Now, another question. After I install the Heroku Toolbelt, the `heroku` command is available on the command-line. But, I can't run it because I haven't installed Ruby. That's because of not patching the shebangs. You are right that it's run