forked from ibis-project/ibis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
poetry-overrides.nix
25 lines (25 loc) · 994 Bytes
/
poetry-overrides.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
final: prev: {
pyspark = prev.pyspark.overridePythonAttrs (attrs:
let
inherit (final) pkgs lib;
pysparkVersion = lib.versions.majorMinor attrs.version;
jarHashes = {
"3.5" = "sha256-KuxLeNgGzIHU5QMls1H2NJyQ3mQVROZExgMvAAk4YYs=";
"3.3" = "sha256-W3ij6mwrIDOc4zGqtpCsbg563qHmdMc8eZnLX6bnl2M=";
};
icebergVersion = "1.5.2";
scalaVersion = "2.12";
jarName = "iceberg-spark-runtime-${pysparkVersion}_${scalaVersion}-${icebergVersion}.jar";
icebergJarUrl = "https://search.maven.org/remotecontent?filepath=org/apache/iceberg/iceberg-spark-runtime-${pysparkVersion}_${scalaVersion}/${icebergVersion}/${jarName}";
icebergJar = pkgs.fetchurl {
name = jarName;
url = icebergJarUrl;
sha256 = jarHashes."${pysparkVersion}";
};
in
{
postInstall = attrs.postInstall or "" + ''
cp ${icebergJar} $out/${final.python.sitePackages}/pyspark/jars/${icebergJar.name}
'';
});
}