···1+{ stdenv, fetchurl, makeWrapper, hadoop, jre, bash }:
2+3+stdenv.mkDerivation rec {
4+5+ name = "pig-0.14.0";
6+7+ src = fetchurl {
8+ url = "mirror://apache/pig/${name}/${name}.tar.gz";
9+ sha256 = "183in34cj93ny3lhqyq76g9pjqgw1qlwakk5v6x847vrlkfndska";
10+11+ };
12+13+ buildInputs = [ makeWrapper ];
14+15+ installPhase = ''
16+ mkdir -p $out
17+ mv * $out
18+19+ # no need for the windows batch script
20+ rm $out/bin/pig.cmd $out/bin/pig.py
21+22+ for n in $out/{bin,sbin}"/"*; do
23+ wrapProgram $n \
24+ --prefix PATH : "${jre}/bin:${bash}/bin" \
25+ --set JAVA_HOME "${jre}" --set HADOOP_PREFIX "${hadoop}"
26+ done
27+ '';
28+29+ meta = with stdenv.lib; {
30+ homepage = "http://pig.apache.org/";
31+ description = "High-level language for Apache Hadoop";
32+ license = licenses.asl20;
33+34+ longDescription = ''
35+ Apache Pig is a platform for analyzing large data sets that consists of a
36+ high-level language for expressing data analysis programs, coupled with
37+ infrastructure for evaluating these programs. The salient property of Pig
38+ programs is that their structure is amenable to substantial parallelization,
39+ which in turns enables them to handle very large data sets.
40+ '';
41+42+ platforms = platforms.linux;
43+ maintainers = [ maintainers.skeidel ];
44+ };
45+}