···11+{ stdenv, fetchurl, makeWrapper, hadoop, jre, bash }:
22+33+stdenv.mkDerivation rec {
44+55+ name = "pig-0.14.0";
66+77+ src = fetchurl {
88+ url = "mirror://apache/pig/${name}/${name}.tar.gz";
99+ sha256 = "183in34cj93ny3lhqyq76g9pjqgw1qlwakk5v6x847vrlkfndska";
1010+1111+ };
1212+1313+ buildInputs = [ makeWrapper ];
1414+1515+ installPhase = ''
1616+ mkdir -p $out
1717+ mv * $out
1818+1919+ # no need for the windows batch script
2020+ rm $out/bin/pig.cmd $out/bin/pig.py
2121+2222+ for n in $out/{bin,sbin}"/"*; do
2323+ wrapProgram $n \
2424+ --prefix PATH : "${jre}/bin:${bash}/bin" \
2525+ --set JAVA_HOME "${jre}" --set HADOOP_PREFIX "${hadoop}"
2626+ done
2727+ '';
2828+2929+ meta = with stdenv.lib; {
3030+ homepage = "http://pig.apache.org/";
3131+ description = "High-level language for Apache Hadoop";
3232+ license = licenses.asl20;
3333+3434+ longDescription = ''
3535+ Apache Pig is a platform for analyzing large data sets that consists of a
3636+ high-level language for expressing data analysis programs, coupled with
3737+ infrastructure for evaluating these programs. The salient property of Pig
3838+ programs is that their structure is amenable to substantial parallelization,
3939+ which in turns enables them to handle very large data sets.
4040+ '';
4141+4242+ platforms = platforms.linux;
4343+ maintainers = [ maintainers.skeidel ];
4444+ };
4545+}