@@ -0,0 +1,41 @@
1+{ lib
2+, fetchFromGitHub
3+, buildPythonPackage
4+, tensorflow
5+, pytest
6+}:
7+
8+buildPythonPackage rec {
9+ pname = "tensorflow-probability";
10+ version = "0.6.0";
11+
12+ src = fetchFromGitHub {
13+ owner = "tensorflow";
14+ repo = "probability";
15+ rev = "v${version}";
16+ sha256 = "1y210n4asv8j39pk68bdfrz01gddflvzhxbcvj5jw6rjgaagnhvx";
17+ };
18+
19+ propagatedBuildInputs = [
20+ tensorflow
21+ ];
22+
23+ checkInputs = [
24+ pytest
25+ ];
26+
27+ # Tests have an invalid import (`tensorflow_probability.opensource`), should
28+ # be resolved in the next version with
29+ # https://github.com/tensorflow/probability/commit/77d5957f2f0bdddcb46582799cd9c5c5167a1a40
30+ doCheck = false;
31+ checkPhase = ''
32+ py.test
33+ '';
34+
35+ meta = with lib; {
36+ description = "Library for probabilistic reasoning and statistical analysis";
37+ homepage = https://www.tensorflow.org/probability/;
38+ license = licenses.asl20;
39+ maintainers = with maintainers; [ timokau ];
40+ };
41+}