depot/third_party/nixpkgs/pkgs/development/python-modules/tensorflow-metadata/default.nix
Default email 14910f5943 Project import generated by Copybara.
GitOrigin-RevId: 5aaed40d22f0d9376330b6fa413223435ad6fee5
2022-01-13 15:06:32 -05:00

46 lines
1 KiB
Nix

{ absl-py
, buildPythonPackage
, fetchFromGitHub
, googleapis-common-protos
, lib
}:
buildPythonPackage rec {
pname = "tensorflow-metadata";
version = "1.5.0";
src = fetchFromGitHub {
owner = "tensorflow";
repo = "metadata";
rev = "v${version}";
sha256 = "17p74k6rwswpmj7m16cw9hdam6b4m7v5bahirmc2l1kwfvrn4w33";
};
patches = [
./build.patch
];
# Default build pulls in Bazel + extra deps, given the actual build
# is literally three lines (see below) - replace it with custom build.
preBuild = ''
for proto in tensorflow_metadata/proto/v0/*.proto; do
protoc --python_out=. $proto
done
'';
propagatedBuildInputs = [
absl-py
googleapis-common-protos
];
pythonImportsCheck = [
"tensorflow_metadata"
];
meta = with lib; {
description = "Standard representations for metadata that are useful when training machine learning models with TensorFlow";
homepage = "https://github.com/tensorflow/metadata";
license = licenses.asl20;
maintainers = with maintainers; [ ndl ];
};
}