2021-01-25 15:18:22 +00:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper, jre }:
|
2017-11-25 19:25:06 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-01-25 15:18:22 +00:00
|
|
|
pname = "flink";
|
2022-03-13 09:19:06 +00:00
|
|
|
version = "1.14.4";
|
2017-11-25 19:25:06 +00:00
|
|
|
|
2017-11-29 02:21:45 +00:00
|
|
|
src = fetchurl {
|
2021-01-25 15:18:22 +00:00
|
|
|
url = "mirror://apache/flink/${pname}-${version}/${pname}-${version}-bin-scala_2.11.tgz";
|
2022-03-13 09:19:06 +00:00
|
|
|
sha256 = "sha256-qvWUh+EQT/MljN5LCX2JLMEapIEGAbAljrCMTYsFqtw=";
|
2017-11-25 19:25:06 +00:00
|
|
|
};
|
|
|
|
|
2017-11-29 02:21:45 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2017-11-25 19:25:06 +00:00
|
|
|
buildInputs = [ jre ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2020-08-16 12:51:00 +00:00
|
|
|
rm bin/*.bat || true
|
2017-11-29 02:21:45 +00:00
|
|
|
|
|
|
|
mkdir -p $out/bin $out/opt/flink
|
|
|
|
mv * $out/opt/flink/
|
|
|
|
makeWrapper $out/opt/flink/bin/flink $out/bin/flink \
|
|
|
|
--prefix PATH : ${jre}/bin
|
2017-11-25 19:25:06 +00:00
|
|
|
|
2017-11-29 02:21:45 +00:00
|
|
|
cat <<EOF >> $out/opt/flink/conf/flink-conf.yaml
|
2017-11-25 19:25:06 +00:00
|
|
|
env.java.home: ${jre}"
|
|
|
|
env.log.dir: /tmp/flink-logs
|
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-11-29 02:21:45 +00:00
|
|
|
description = "A distributed stream processing framework";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://flink.apache.org";
|
|
|
|
downloadPage = "https://flink.apache.org/downloads.html";
|
2017-11-29 02:21:45 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ mbode ];
|
2017-11-25 19:25:06 +00:00
|
|
|
};
|
|
|
|
}
|