nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 59 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 makeWrapper, 6 hadoop, 7 jre, 8 bash, 9}: 10 11stdenv.mkDerivation rec { 12 pname = "pig"; 13 version = "0.17.0"; 14 15 src = fetchurl { 16 url = "mirror://apache/pig/${pname}-${version}/${pname}-${version}.tar.gz"; 17 sha256 = "1wwpg0w47f49rnivn2d26vrxgyfl9gpqx3vmzbl5lhx6x5l3fqbd"; 18 19 }; 20 21 nativeBuildInputs = [ makeWrapper ]; 22 23 installPhase = '' 24 mkdir -p $out 25 mv * $out 26 27 # no need for the windows batch script 28 rm $out/bin/pig.cmd $out/bin/pig.py 29 30 for n in $out/{bin,sbin}"/"*; do 31 wrapProgram $n \ 32 --prefix PATH : "${ 33 lib.makeBinPath [ 34 jre 35 bash 36 ] 37 }" \ 38 --set JAVA_HOME "${jre}" --set HADOOP_PREFIX "${hadoop}" 39 done 40 ''; 41 42 meta = with lib; { 43 homepage = "https://pig.apache.org/"; 44 description = "High-level language for Apache Hadoop"; 45 mainProgram = "pig"; 46 license = licenses.asl20; 47 48 longDescription = '' 49 Apache Pig is a platform for analyzing large data sets that consists of a 50 high-level language for expressing data analysis programs, coupled with 51 infrastructure for evaluating these programs. The salient property of Pig 52 programs is that their structure is amenable to substantial parallelization, 53 which in turns enables them to handle very large data sets. 54 ''; 55 56 platforms = platforms.linux; 57 maintainers = [ ]; 58 }; 59}