forked from mirrors/nixpkgs
rubygems: bump nix-ruby, more nix magic
svn path=/nixpkgs/trunk/; revision=27179
This commit is contained in:
parent
69822bf6c1
commit
bfffc57cc6
|
@ -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'';
|
||||
|
|
|
@ -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";
|
||||
})
|
||||
|
|
|
@ -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.
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue