Files
nixpkgs/pkgs/development/python-modules/dbt-adapters/default.nix
T
Sergei Trofimovich 068bac79b8 python3Packages.dbt-adapters: fix the val
Without the change the eval fails on `staging-next` as:

    $ nix build --no-link -f. python3Packages.dbt-adapters
    error:
       … while evaluating a branch condition
         at pkgs/development/interpreters/python/passthrufun.nix:27:9:
           26|       func = name: value:
           27|         if lib.isDerivation value then
             |         ^
           28|           lib.extendDerivation (valid value || throw "${name} should use `buildPythonPackage` or `toPythonModule` if it is to be part of the Python packages set.") {} value

       … while evaluating a branch condition
         at /home/slyfox/dev/git/nixpkgs-staging-next/lib/customisation.nix:263:8:
          262|
          263|     in if missingArgs == {}
             |        ^
          264|        then makeOverridable f allArgs

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'pythonRelaxDeps' already defined at pkgs/development/python-modules/dbt-adapters/default.nix:30:3
       at pkgs/development/python-modules/dbt-adapters/default.nix:34:3:
           33|
           34|   pythonRelaxDeps = [ "protobuf" ];
             |   ^
           35|
2024-10-20 19:08:04 +01:00

58 lines
1.2 KiB
Nix

{
lib,
agate,
buildPythonPackage,
dbt-common,
fetchFromGitHub,
hatchling,
mashumaro,
protobuf,
pytestCheckHook,
pythonOlder,
pytz,
typing-extensions,
}:
buildPythonPackage rec {
pname = "dbt-adapters";
version = "1.7.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "dbt-labs";
repo = "dbt-adapters";
rev = "refs/tags/v${version}";
hash = "sha256-I3A3rIMpT+MAq+ebid9RMr6I3W1l4ir78UmfeEr5U3U=";
};
build-system = [ hatchling ];
pythonRelaxDeps = [ "protobuf" ];
dependencies = [
agate
dbt-common
mashumaro
protobuf
pytz
typing-extensions
] ++ mashumaro.optional-dependencies.msgpack;
pythonImportsCheck = [ "dbt.adapters" ];
# circular dependencies
doCheck = false;
nativeCheckInputs = [ pytestCheckHook ];
meta = {
description = "The set of adapter protocols and base functionality that supports integration with dbt-core";
homepage = "https://github.com/dbt-labs/dbt-adapters";
changelog = "https://github.com/dbt-labs/dbt-adapters/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.asl20;
maintainers = [ ];
};
}