dbt-nix/nix/dbt-postgres/default.nix

27 lines
632 B
Nix
Raw Normal View History

2022-07-13 10:42:07 -04:00
{pkgs, dbt-core, version}:
2022-04-05 11:59:17 -04:00
with pkgs;
with python39Packages;
let inputs = [
dbt-core
typing-extensions
jinja2
2022-07-13 10:42:07 -04:00
psycopg2_2_8
2022-04-05 11:59:17 -04:00
];
in
buildPythonPackage rec {
pname = "dbt-postgres";
2022-07-13 10:42:07 -04:00
inherit version;
2022-04-05 11:59:17 -04:00
buildInputs = inputs;
propagatedBuildInputs = inputs;
doCheck = false;
# This is gross but I couldn't figure out how to set an environment variable
# to configure this properly.
patchPhase = ''
2022-07-13 10:42:07 -04:00
sed -ibak "s/psycopg2-binary/psycopg2/" setup.py
2022-04-05 11:59:17 -04:00
'';
src = fetchPypi {
inherit pname version;
2022-07-13 10:42:07 -04:00
sha256 = "sha256-fz1uSdFju5HpUCKuTSBQzPxibrJVMfD+er6zmfp9B2E=";
2022-04-05 11:59:17 -04:00
};
2022-07-13 10:42:07 -04:00
}