package.nix (1392B)
1 { 2 lib, 3 python3Packages, 4 fetchFromGitHub, 5 fetchpatch, 6 }: 7 8 python3Packages.buildPythonPackage { 9 pname = "pyrobuf"; 10 version = "0.9.3"; 11 pyproject = true; 12 13 src = fetchFromGitHub { 14 owner = "appnexus"; 15 repo = "pyrobuf"; 16 rev = "811a9325eed1c0070ceb424020fe81eeef317e0c"; 17 hash = "sha256-7NEzRM9B/9f5ODNzDKws7t/9gqbJK7T9AuET+pT26P0="; 18 }; 19 20 # https://github.com/appnexus/pyrobuf/pull/165 21 patches = [ 22 (fetchpatch { 23 url = "https://github.com/appnexus/pyrobuf/commit/af98f882e00c4bfa621f2e70f4ca7a4f30c6c306.patch"; 24 hash = "sha256-+EVjmQs45j9siGcw0T++Kt7CGaAW6Z79xj3PDXPFj5E="; 25 }) 26 (fetchpatch { 27 url = "https://github.com/appnexus/pyrobuf/commit/c3d1972111e74dbe89b2feda375d2a50e9668df8.patch"; 28 hash = "sha256-igp021IXYoMZprrroILtqqHkMGAiypbR9I3zq21B8BU="; 29 }) 30 ]; 31 32 postPatch = '' 33 substituteInPlace setup.py \ 34 --replace-fail ", 'pytest-runner'" "" 35 ''; 36 37 build-system = with python3Packages; [ setuptools ]; 38 39 nativeBuildInputs = with python3Packages; [ 40 cython 41 ]; 42 43 dependencies = with python3Packages; [ jinja2 ]; 44 45 nativeCheckInputs = with python3Packages; [ pytestCheckHook ]; 46 47 doCheck = false; 48 49 meta = { 50 description = "A Cython based protobuf compiler"; 51 homepage = "https://github.com/appnexus/pyrobuf"; 52 license = lib.licenses.asl20; 53 maintainers = [ lib.maintainers.sikmir ]; 54 }; 55 }
