2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper, hadoop, jre, bash }:
|
2015-04-28 17:56:29 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-12 11:51:53 +01:00
|
|
|
pname = "pig";
|
|
|
|
version = "0.17.0";
|
2015-04-28 17:56:29 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-07-12 11:51:53 +01:00
|
|
|
url = "mirror://apache/pig/${pname}-${version}/${pname}-${version}.tar.gz";
|
2018-12-19 17:51:55 +00:00
|
|
|
sha256 = "1wwpg0w47f49rnivn2d26vrxgyfl9gpqx3vmzbl5lhx6x5l3fqbd";
|
2015-04-28 17:56:29 +01:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2018-12-19 17:51:55 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2015-04-28 17:56:29 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
mv * $out
|
|
|
|
|
|
|
|
# no need for the windows batch script
|
|
|
|
rm $out/bin/pig.cmd $out/bin/pig.py
|
|
|
|
|
|
|
|
for n in $out/{bin,sbin}"/"*; do
|
|
|
|
wrapProgram $n \
|
2021-01-15 05:42:41 +00:00
|
|
|
--prefix PATH : "${lib.makeBinPath [ jre bash ]}" \
|
2015-04-28 17:56:29 +01:00
|
|
|
--set JAVA_HOME "${jre}" --set HADOOP_PREFIX "${hadoop}"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://pig.apache.org/";
|
2015-04-28 17:56:29 +01:00
|
|
|
description = "High-level language for Apache Hadoop";
|
|
|
|
license = licenses.asl20;
|
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
Apache Pig is a platform for analyzing large data sets that consists of a
|
|
|
|
high-level language for expressing data analysis programs, coupled with
|
|
|
|
infrastructure for evaluating these programs. The salient property of Pig
|
|
|
|
programs is that their structure is amenable to substantial parallelization,
|
|
|
|
which in turns enables them to handle very large data sets.
|
|
|
|
'';
|
|
|
|
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.skeidel ];
|
|
|
|
};
|
|
|
|
}
|