nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

opencensus: init at 0.11.0

update hash

use python.sitePackage

add pythonImportsCheck

+55
+55
pkgs/development/python-modules/opencensus/default.nix
··· 1 + { buildPythonPackage 2 + , fetchPypi 3 + , lib 4 + , python 5 + , unittestCheckHook 6 + , google-api-core 7 + }: 8 + 9 + let 10 + opencensus-context = buildPythonPackage rec { 11 + pname = "opencensus-context"; 12 + version = "0.1.3"; 13 + 14 + checkInputs = [ unittestCheckHook ]; 15 + 16 + src = fetchPypi { 17 + inherit pname version; 18 + sha256 = "sha256-oDEIw8ENjIC7Xd9cih8DMWH6YZcqmRf5ubOhhRfwCIw="; 19 + }; 20 + }; 21 + in 22 + buildPythonPackage rec { 23 + pname = "opencensus"; 24 + version = "0.11.0"; 25 + 26 + src = fetchPypi { 27 + inherit pname version; 28 + sha256 = "sha256-AmIWq6uJ2U2FBJLz3GWVAFXsT4QRX6bHvq/7pEo0bkI="; 29 + }; 30 + 31 + buildInputs = [ 32 + # opencensus-context is embedded in opencensus 33 + opencensus-context 34 + ]; 35 + 36 + propagatedBuildInputs = [ 37 + google-api-core 38 + ]; 39 + 40 + postInstall = '' 41 + ln -sf ${opencensus-context}/${python.sitePackages}/opencensus/common/runtime_context \ 42 + $out/${python.sitePackages}/opencensus/common/ 43 + ''; 44 + 45 + checkInputs = [ unittestCheckHook ]; 46 + 47 + pythonImportsCheck = [ "opencensus" ]; 48 + 49 + meta = with lib; { 50 + description = "A stats collection and distributed tracing framework"; 51 + homepage = "https://github.com/census-instrumentation/opencensus-python"; 52 + license = licenses.asl20; 53 + maintainers = with maintainers; [ billhuang ]; 54 + }; 55 + }