diff --git a/pkgs/development/interpreters/ruby/generated.nix b/pkgs/development/interpreters/ruby/generated.nix index f806bc8a9333..7f6d51b24183 100644 --- a/pkgs/development/interpreters/ruby/generated.nix +++ b/pkgs/development/interpreters/ruby/generated.nix @@ -3,21 +3,21 @@ g: # Get dependencies from patched gems { aliases = { - nix = g.nix_0_1; + nix = g.nix_0_1_1; rake = g.rake_0_8_7; }; gem_nix_args = [ ''nix'' ''rake'' ]; gems = { - nix_0_1 = { + nix_0_1_1 = { basename = ''nix''; meta = { description = ''Nix package manager interface''; homepage = ''http://gitorious.org/ruby-nix''; longDescription = ''Adds 'gem nix' command that dumps given set of gems to format suitable for Nix package manager''; }; - name = ''nix-0.1''; + name = ''nix-0.1.1''; requiredGems = [ ]; - sha256 = ''16lc3yfjcsm1s5jjfazlwia1vhy6x401f0mam79r2qkcic70xnap''; + sha256 = ''0kwrbkkg0gxibhsz9dpd5zabcf2wqsicg28yiazyb3dc9dslk26k''; }; rake_0_8_7 = { basename = ''rake''; diff --git a/pkgs/development/interpreters/ruby/libs.nix b/pkgs/development/interpreters/ruby/libs.nix index d0b6401abc29..9aa9203f10f6 100644 --- a/pkgs/development/interpreters/ruby/libs.nix +++ b/pkgs/development/interpreters/ruby/libs.nix @@ -26,8 +26,20 @@ in generated = import ./generated.nix; patches = import ./patches.nix; overrides = import ./overrides.nix; -}).merge { - generated = getConfig [ "gems" "generated" ] null; - patches = getConfig [ "gems" "patches" ] null; - overrides = getConfig [ "gems" "overrides" ] null; -} +}).merge ( + let + localGemDir = (builtins.getEnv "HOME") + "/.nixpkgs/gems/"; + getLocalGemFun = name: + let + file = localGemDir + name + ".nix"; + fallback = + if builtins.pathExists file then import (builtins.toPath file) + else null; + in + getConfig [ "gems" name ] fallback; + in +{ + generated = getLocalGemFun "generated"; + patches = getLocalGemFun "patches"; + overrides = getLocalGemFun "overrides"; +}) diff --git a/pkgs/development/interpreters/ruby/rubygems.nix b/pkgs/development/interpreters/ruby/rubygems.nix index 6c0cef9b4d14..bfea04d1aba0 100644 --- a/pkgs/development/interpreters/ruby/rubygems.nix +++ b/pkgs/development/interpreters/ruby/rubygems.nix @@ -42,8 +42,10 @@ rec { To use it do the following: 1. Install rubygems and rubyLibs.nix. 2. Add $your_profile/${ruby.gemPath} to GEM_PATH. - 3. export RUBYLIB=$your_profile/lib RUBYOPT=rubygems - 4. See `gem nix --help` for the rest. + 3. export RUBYLIB=$your_profile/lib RUBYOPT=rubygems. + 4. Run `gem nix --[no-]user-install gem1 gem2 ...` to generate Nix + expression from gem repository. + 5. Install rubyLibs.gem1 etc. ''; };