1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-17 19:21:04 +00:00
nixpkgs/pkgs/by-name/fl/flink/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

41 lines
1.1 KiB
Nix

{ lib, stdenv, fetchurl, makeWrapper, jre }:
stdenv.mkDerivation rec {
pname = "flink";
version = "1.20.0";
src = fetchurl {
url = "mirror://apache/flink/${pname}-${version}/${pname}-${version}-bin-scala_2.12.tgz";
sha256 = "sha256-cI/VRMz53cDUsZL+A1eXzhbeLCbx12TFWQcwXv4UCvA=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre ];
installPhase = ''
rm bin/*.bat || true
mkdir -p $out/bin $out/opt/flink
mv * $out/opt/flink/
makeWrapper $out/opt/flink/bin/flink $out/bin/flink \
--prefix PATH : ${jre}/bin
cat <<EOF >> $out/opt/flink/conf/flink-conf.yaml
env.java.home: ${jre}
env.log.dir: /tmp/flink-logs
EOF
'';
meta = with lib; {
description = "Distributed stream processing framework";
mainProgram = "flink";
homepage = "https://flink.apache.org";
downloadPage = "https://flink.apache.org/downloads.html";
license = licenses.asl20;
sourceProvenance = with sourceTypes; [ binaryBytecode ];
platforms = platforms.all;
maintainers = with maintainers; [ mbode autophagy ];
};
}