mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 12:53:59 +03:00
package gim-nix and document it
This commit is contained in:
parent
2632afa131
commit
aa162b388d
@ -233,6 +233,17 @@ twisted = buildPythonPackage {
|
|||||||
</section>
|
</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>
|
<section xml:id="ssec-language-java"><title>Java</title>
|
||||||
|
|
||||||
<para>Ant-based Java packages are typically built from source as follows:
|
<para>Ant-based Java packages are typically built from source as follows:
|
||||||
|
@ -29,13 +29,7 @@ rec {
|
|||||||
longDescription = ''
|
longDescription = ''
|
||||||
Nix can create nix packages from gems.
|
Nix can create nix packages from gems.
|
||||||
|
|
||||||
To use it do the following:
|
To use it by installing gem-nix package.
|
||||||
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.
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
23
pkgs/tools/package-management/gem-nix/default.nix
Normal file
23
pkgs/tools/package-management/gem-nix/default.nix
Normal 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 ];
|
||||||
|
};
|
||||||
|
}
|
@ -3087,6 +3087,8 @@ let
|
|||||||
|
|
||||||
fsharp = callPackage ../development/compilers/fsharp {};
|
fsharp = callPackage ../development/compilers/fsharp {};
|
||||||
|
|
||||||
|
gem-nix = callPackage ../tools/package-management/gem-nix { };
|
||||||
|
|
||||||
go_1_0 = callPackage ../development/compilers/go { };
|
go_1_0 = callPackage ../development/compilers/go { };
|
||||||
|
|
||||||
go_1_1 =
|
go_1_1 =
|
||||||
|
Loading…
Reference in New Issue
Block a user