Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 agate, 4 buildPythonPackage, 5 fetchFromGitHub, 6 dbt-adapters, 7 dbt-common, 8 dbt-core, 9 hatchling, 10 psycopg2, 11 pythonOlder, 12}: 13 14buildPythonPackage rec { 15 pname = "dbt-postgres"; 16 version = "1.8.2"; 17 pyproject = true; 18 19 disabled = pythonOlder "3.8"; 20 21 src = fetchFromGitHub { 22 owner = "dbt-labs"; 23 repo = "dbt-postgres"; 24 rev = "refs/tags/v${version}"; 25 hash = "sha256-E7Y2lY8aCiAZx5sLWwpOBLTrdOsCQAdWWJTvR2jGOaA="; 26 }; 27 28 env.DBT_PSYCOPG2_NAME = "psycopg2"; 29 30 build-system = [ hatchling ]; 31 32 pythonRemoveDeps = [ "psycopg2-binary" ]; 33 34 dependencies = [ 35 agate 36 dbt-adapters 37 dbt-common 38 dbt-core 39 psycopg2 40 ]; 41 42 # tests exist for the dbt tool but not for this package specifically 43 doCheck = false; 44 45 pythonImportsCheck = [ "dbt.adapters.postgres" ]; 46 47 meta = with lib; { 48 description = "Plugin enabling dbt to work with a Postgres database"; 49 homepage = "https://github.com/dbt-labs/dbt-core"; 50 license = licenses.asl20; 51 maintainers = with maintainers; [ tjni ]; 52 }; 53}