nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchPypi,
6 pytestCheckHook,
7 setuptools,
8 legacy-cgi,
9}:
10
11buildPythonPackage rec {
12 pname = "pydal";
13 version = "20260118.1";
14 pyproject = true;
15
16 src = fetchPypi {
17 inherit pname version;
18 hash = "sha256-bJ9/pnip0IKzI/nmTXcNfv1QpGVDEH+1eQi2zMr/u88=";
19 };
20
21 build-system = [ setuptools ];
22
23 nativeCheckInputs = [ pytestCheckHook ];
24
25 checkInputs = [ legacy-cgi ];
26
27 enabledTestPaths = [
28 "tests/*.py"
29 ];
30
31 disabledTestPaths = [
32 # these tests already seem to be broken on the upstream
33 "tests/nosql.py::TestFields::testRun"
34 "tests/nosql.py::TestSelect::testGroupByAndDistinct"
35 "tests/nosql.py::TestExpressions::testOps"
36 "tests/nosql.py::TestExpressions::testRun"
37 "tests/nosql.py::TestImportExportUuidFields::testRun"
38 "tests/nosql.py::TestConnection::testRun"
39 "tests/restapi.py::TestRestAPI::test_search"
40 "tests/validation.py::TestValidateAndInsert::testRun"
41 "tests/validation.py::TestValidateUpdateInsert::testRun"
42 "tests/validators.py::TestValidators::test_IS_IN_DB"
43 ];
44
45 disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
46 # socket.gaierror: [Errno 8] nodename nor servname provided, or not known
47 "test_scheduler"
48 ];
49
50 pythonImportsCheck = [ "pydal" ];
51
52 meta = {
53 description = "Python Database Abstraction Layer";
54 homepage = "https://github.com/web2py/pydal";
55 changelog = "https://github.com/web2py/pydal/commits/v${version}";
56 license = with lib.licenses; [ bsd3 ];
57 maintainers = with lib.maintainers; [ wamserma ];
58 };
59}