Files
scylladb/dist/nix/pkg/upstreamable/python-driver/default.nix
Michael Livshin 7bd13be3f2 build: improvements & upgrades to Nix dev environment
* Add some more useful stuff to the shell environment, so it actually
  works for debugging & post-mortem analysis.

* Wrap ccache & distcc transparently (distcc will be used unless
  NODISTCC is set to a non-empty value in the environment; ccache will
  be used if CCACHE_DIR is not empty).

* Package the Scylla Python driver (instead of the C* one).

* Catch up to misc build/test requirements (including optional) by
  requiring or custom-packaging: wasmtime 0.29.0, cxxbridge,
  pytest-asyncio, liburing.

* Build statically-linked zstd in a saner and more idiomatic fashion.

* In pure builds (where sources lack Git metadata), derive
  SCYLLA_RELEASE from source hash.

* Refactor things for more parameterization.

* Explicitly stub out installPhase (seeing that "nix build" succeeds
  up to installPhase means we didn't miss any dependencies).

* Add flake support.

* Add copious comments.

Signed-off-by: Michael Livshin <michael.livshin@scylladb.com>
2022-10-02 11:47:16 +03:00

32 lines
655 B
Nix

{ stdenv
, lib
, fetchFromGitHub
, python3Packages
, libev
}:
let
version = "3.25.4-scylla";
in python3Packages.buildPythonPackage {
pname = "scylla-driver";
inherit version;
# pypi tarball doesn't include tests
src = fetchFromGitHub {
owner = "scylladb";
repo = "python-driver";
rev = version;
sha256 = "sha256-LIPZ4sY/wrhmy+kpFUwBvgvbJoXanQLkzMd5Iv0X2mc=";
};
postPatch = ''
substituteInPlace setup.py --replace 'geomet>=0.1,<0.3' 'geomet'
'';
nativeBuildInputs = with python3Packages; [ cython ];
buildInputs = [ libev ];
propagatedBuildInputs = with python3Packages; [ six geomet ];
doCheck = false;
}