1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

package gim-nix and document it

This commit is contained in:
Domen Kožar 2014-09-12 00:26:13 +02:00
parent 2632afa131
commit aa162b388d
4 changed files with 37 additions and 7 deletions

View file

@ -233,6 +233,17 @@ twisted = buildPythonPackage {
</section>
<section xml:id="ssec-language-java"><title>Ruby</title>
<para>For example, to package yajl-ruby package, use gem-nix:</para>
<screen>
$ nix-env -i gem-nix
$ gem-nix --no-user-install --nix-file=pkgs/development/interpreters/ruby/generated.nix yajl-ruby
$ nix-build -A rubyLibs.yajl-ruby
</screen>
</section>
<section xml:id="ssec-language-java"><title>Java</title>
<para>Ant-based Java packages are typically built from source as follows:

View file

@ -29,13 +29,7 @@ rec {
longDescription = ''
Nix can create nix packages from gems.
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. Run `gem nix --[no-]user-install gem1 gem2 ...` to generate Nix
expression from gem repository.
5. Install rubyLibs.gem1 etc.
To use it by installing gem-nix package.
'';
};

View file

@ -0,0 +1,23 @@
{ stdenv, rubygems, rubyLibs, ruby, makeWrapper }:
stdenv.mkDerivation rec {
name = "gem-nix";
buildInputs = [ ruby rubygems rubyLibs.nix makeWrapper ];
phases = ["installPhase"];
installPhase = ''
mkdir -p $out/bin
echo 'exec ${rubygems}/bin/gem nix "$@"' >> $out/bin/gem-nix
chmod +x $out/bin/gem-nix
wrapProgram $out/bin/gem-nix \
--set GEM_PATH $GEM_PATH
'';
meta = with stdenv.lib; {
description = "gem nix command in a nice wrapper";
platforms = platforms.linux;
maintainers = [ maintainers.iElectric ];
};
}

View file

@ -3087,6 +3087,8 @@ let
fsharp = callPackage ../development/compilers/fsharp {};
gem-nix = callPackage ../tools/package-management/gem-nix { };
go_1_0 = callPackage ../development/compilers/go { };
go_1_1 =