Skip to content

Commit

Permalink
jruby wip
Browse files Browse the repository at this point in the history
  • Loading branch information
peterhoeg committed May 29, 2017
1 parent 65477dc commit 66c8cf8
Showing 1 changed file with 29 additions and 18 deletions.
47 changes: 29 additions & 18 deletions pkgs/development/interpreters/jruby/default.nix
@@ -1,33 +1,44 @@
{ stdenv, fetchurl, makeWrapper, jre }:
{ stdenv, fetchurl, makeWrapper, jdk, buildMaven, maven, which }:

stdenv.mkDerivation rec {
name = "jruby-${version}";

version = "9.0.5.0";
version = "9.1.10.0";

src = fetchurl {
url = "https://s3.amazonaws.com/jruby.org/downloads/${version}/jruby-bin-${version}.tar.gz";
sha256 = "1wysymqzc7591743f2ycgwpm232y6i050izn72lck44nhnyr5wwy";
url = "https://s3.amazonaws.com/jruby.org/downloads/${version}/jruby-src-${version}.tar.gz";
sha256 = "1xihzaqg47d0blh1hcpd4zyp11dhd3w9n57mcx498nw4azw6pxla";
};

buildInputs = [ makeWrapper ];
preBuild = ''
set -x
installPhase = ''
mkdir -pv $out/docs
mv * $out
rm $out/bin/*.{bat,dll,exe,sh}
mv $out/COPYING $out/LICENSE* $out/docs
for i in $out/bin/*; do
wrapProgram $i \
--set JAVA_HOME ${jre}
done
export JAVA_HOME=${jdk}
export M2_HOME=${maven}/maven
./mvnw
'';

meta = {
buildInputs = [ jdk ];
nativeBuildInputs = [ makeWrapper maven which ];

# nativeBuildInputs = [ buildMaven makeWrapper ];

# installPhase = ''
# mkdir -pv $out/docs
# mv * $out
# rm $out/bin/*.{bat,dll,exe,sh}
# mv $out/COPYING $out/LICENSE* $out/docs

# for i in $out/bin/*; do
# wrapProgram $i \
# --set JAVA_HOME ${jre}
# done
# '';

meta = with stdenv.lib; {
description = "Ruby interpreter written in Java";
homepage = http://jruby.org/;
license = with stdenv.lib.licenses; [ cpl10 gpl2 lgpl21 ];
platforms = stdenv.lib.platforms.unix;
license = with licenses; [ cpl10 gpl2 lgpl21 ];
platforms = platforms.unix;
};
}

0 comments on commit 66c8cf8

Please sign in to comment.