4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
36 lines
729 B
Nix
36 lines
729 B
Nix
{ lib, stdenv
|
|
, buildPythonPackage
|
|
, capnproto
|
|
, cython
|
|
, fetchFromGitHub
|
|
, isPy27
|
|
, isPyPy
|
|
, pkgconfig
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pycapnp";
|
|
version = "1.0.0";
|
|
disabled = isPyPy || isPy27;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "capnproto";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "1n6dq2fbagi3wvrpkyb7wx4y15nkm2grln4y75hrqgmnli8ggi9v";
|
|
};
|
|
|
|
buildInputs = [ capnproto cython pkgconfig ];
|
|
|
|
# Tests disabled due to dependency on jinja and various other libraries.
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "capnp" ];
|
|
|
|
meta = with lib; {
|
|
maintainers = with maintainers; [ cstrahan lukeadams ];
|
|
license = licenses.bsd2;
|
|
homepage = "https://capnproto.github.io/pycapnp/";
|
|
};
|
|
}
|