Update to dbt-nix 1.1

This commit is contained in:
Jeremy Wall 2022-07-13 10:42:07 -04:00
parent 9d77b1220f
commit 64830d3319
7 changed files with 74 additions and 65 deletions

6
flake.lock generated
View File

@ -32,11 +32,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1648219316,
"narHash": "sha256-Ctij+dOi0ZZIfX5eMhgwugfvB+WZSrvVNAyAuANOsnQ=",
"lastModified": 1657649905,
"narHash": "sha256-gth8ki7Sme/DjUc/hXBHpn+cvQSx9oTLCXUjQbbrn3M=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "30d3d79b7d3607d56546dd2a6b49e156ba0ec634",
"rev": "09066922296d9ef06bfadb937b2560524dd10785",
"type": "github"
},
"original": {

View File

@ -10,14 +10,15 @@
outputs = {self, nixpkgs, rust-overlay, flake-utils, ...}:
flake-utils.lib.eachDefaultSystem(system:
let
let
version = "1.1.0";
dbt-overlay = import ./nix/overlay.nix;
# TODO(jwall): Is this overlay strictly necessary?
pkgs = import nixpkgs {inherit system; overlays = [ dbt-overlay rust-overlay.overlay ]; };
dbt-core = import ./nix/dbt-core/default.nix { inherit pkgs; };
dbt-postgres = import ./nix/dbt-postgres/default.nix { inherit pkgs dbt-core; };
dbt-redshift = import ./nix/dbt-redshift/default.nix { inherit pkgs dbt-core dbt-postgres; };
dbt-sqlite = import ./nix/dbt-sqlite/default.nix { inherit pkgs dbt-core; };
dbt-core = import ./nix/dbt-core/default.nix { inherit pkgs version; };
dbt-postgres = import ./nix/dbt-postgres/default.nix { inherit pkgs dbt-core version; };
dbt-redshift = import ./nix/dbt-redshift/default.nix { inherit pkgs dbt-core dbt-postgres version; };
dbt-sqlite = import ./nix/dbt-sqlite/default.nix { inherit pkgs dbt-core version; };
in
{
inherit dbt-core dbt-postgres dbt-redshift dbt-sqlite;

View File

@ -1,4 +1,4 @@
{pkgs}:
{pkgs, version}:
with pkgs;
with python39Packages;
let inputs = [
@ -21,11 +21,12 @@ let inputs = [
python-dateutil
msgpack
pyyaml
markupsafe
];
in
buildPythonPackage rec {
pname = "dbt-core";
version = "1.0.0";
inherit version;
buildInputs = inputs;
@ -35,7 +36,6 @@ buildPythonPackage rec {
src = fetchPypi {
inherit pname version;
sha256 = "sha256-kL3gHQeLHWc9xJC53v/wfn87cCuSDGX+rm+yfgfOc9I=";
sha256 = "sha256-PjPOW+dODU+fKK12tLHeVcs0PUxTw6j5jCRVGIGu3z4=";
};
}

View File

@ -1,27 +1,26 @@
{pkgs, dbt-core}:
{pkgs, dbt-core, version}:
with pkgs;
with python39Packages;
let inputs = [
dbt-core
typing-extensions
jinja2
psycopg2
psycopg2_2_8
];
in
buildPythonPackage rec {
pname = "dbt-postgres";
version = "1.0.0";
inherit version;
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 = ''
sed -ibak "s/return 'psycopg2-binary'/return 'psycopg2'/" setup.py
sed -ibak "s/psycopg2-binary/psycopg2/" setup.py
'';
src = fetchPypi {
inherit pname version;
sha256 = "sha256-eOrEulixIEBx3oTbaaxE3Gg3K2gNo5h5QoJhM48SKZI=";
sha256 = "sha256-fz1uSdFju5HpUCKuTSBQzPxibrJVMfD+er6zmfp9B2E=";
};
}

View File

@ -1,4 +1,4 @@
{pkgs, dbt-core, dbt-postgres}:
{pkgs, dbt-core, dbt-postgres, version}:
with pkgs;
with python39Packages;
let inputs = [
@ -15,12 +15,12 @@ let inputs = [
in
buildPythonPackage rec {
pname = "dbt-redshift";
version = "1.0.0";
inherit version;
buildInputs = inputs;
propagatedBuildInputs = inputs;
doCheck = false;
src = fetchPypi {
inherit pname version;
sha256 = "sha256-ZBkhKxxUA1jyubMkCPzmvqyTh8QPgQ2Y33gEOV6Sc78=";
sha256 = "sha256-CNkCORCVdAtE14CxKGpheXkOq4QyTq/huR0IWQzHWmI=";
};
}

View File

@ -4,13 +4,13 @@ with python39Packages;
let
dbt-sqlite = buildPythonPackage rec {
pname = "dbt-sqlite";
version = "1.0.0";
version = "1.1.0";
propagatedBuildInputs = [
dbt-core
];
src = fetchPypi {
inherit pname version;
sha256 = "sha256-nIwk30kMvWBtbAPVE1kfdc4l9W3rWdBRB082OyoiccA=";
sha256 = "sha256-Nktr0mQWYQ7FGl1AB/BBHZCu0YZeA/M7oaZMDLE+NtI=";
};
};
in symlinkJoin {

View File

@ -3,7 +3,7 @@
packageOverrides = (pyself: pysuper: rec {
dbt-extractor = pyself.buildPythonPackage rec {
pname = "dbt_extractor";
version = "0.4.0";
version = "0.4.1";
format = "pyproject";
nativeBuildInputs = with self.rustPlatform; [
cargoSetupHook maturinBuildHook
@ -12,12 +12,12 @@
buildInputs = [ self.libiconv ];
src = pyself.fetchPypi {
inherit pname version;
sha256 = "sha256-WGcuNvq5iMhJppNAWSDuGEIfJyRcSOX57PSWNp7TGoU=";
sha256 = "sha256-dbHGZWmewPH/zhuj13b3386AIVbyLnCnucjwtNfoD0I=";
};
cargoDeps = self.rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-FXMIatCTZJSLaABYO/lcBsONXw8FPNQmcm/tRwkSE54=";
hash = "sha256-COuFqMxgzPEldfdP9WTZjUq504bLF+qopZYfDQeWLzM=";
patchPhase = ''
pwd
ls
@ -41,15 +41,15 @@
# The tests use the network so disable for now.
doCheck = false;
};
colorama = pysuper.colorama.overrideAttrs (oldAttrs: rec {
version = "0.3.9";
pname = oldAttrs.pname;
src = pyself.fetchPypi {
inherit pname;
inherit version;
sha256 = "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8";
};
});
#colorama = pysuper.colorama.overrideAttrs (oldAttrs: rec {
# version = "0.3.9";
# pname = oldAttrs.pname;
# src = pyself.fetchPypi {
# inherit pname;
# inherit version;
# sha256 = "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8";
# };
#});
networkx = pyself.buildPythonPackage rec {
pname = "networkx";
version = "2.7.1";
@ -72,7 +72,7 @@
pname = "mashumaro";
version = "2.9";
buildInputs = [
msgpack
pysuper.msgpack
typing-extensions
pyyaml
networkx
@ -110,6 +110,15 @@
sha256 = "sha256-rKv3Vy2w5/XL9pg9SV7vVAgfcb45IzDrOq25zLOdqqQ=";
};
};
markupsafe = pysuper.markupsafe.overrideAttrs (oldAttrs: rec {
version = "2.0.1";
pname = oldAttrs.pname;
src = pyself.fetchPypi {
inherit version;
pname = "MarkupSafe";
sha256 = "sha256-WUxngH+xYjizDES99082wCzfItHIzake+KDtjav1Ygo=";
};
});
jinja2 = pysuper.jinja2.overrideAttrs (oldAttrs: rec {
version = "2.11.3";
pname = oldAttrs.pname;
@ -118,18 +127,18 @@
sha256 = "sha256-ptWEM94K6AA0fKsfowQ867q+i6qdKeZo8cdoy4ejM8Y=";
};
});
psycopg2 = pysuper.psycopg2.overrideAttrs (oldAttrs: rec {
psycopg2_2_8 = pysuper.psycopg2.overrideAttrs (oldAttrs: rec {
pname = "psycopg2";
version = "2.8";
version = "2.8.1";
src = pyself.fetchPypi {
inherit pname version;
sha256 = "sha256-ScWDjZDoMheQnbN4nTChBThbXmluxRaM2mRVRsVC81o=";
sha256 = "sha256-tKR1zofqvAYH4GijxwTQqgggI37XjUk7ji2IDrc81/4=";
};
});
s3transfer = pysuper.s3transfer.overrideAttrs (oldAttres: rec {
# The tests use the network so disable for now.
doCheck = false;
});
#s3transfer = pysuper.s3transfer.overrideAttrs (oldAttres: rec {
# # The tests use the network so disable for now.
# doCheck = false;
#});
logbook = with pyself; buildPythonPackage rec {
pname = "Logbook";
version = "1.5.3";
@ -148,24 +157,24 @@
sha256 = "sha256-SfddFv8R8c0ljhuYjM/4KjylVwIX162MX0ggXdmaZ34=";
};
};
python-dateutil = pysuper.python-dateutil.overrideAttrs (oldAttrs: rec {
pname = oldAttrs.pname;
version = "2.8.0";
src = pyself.fetchPypi {
inherit pname version;
sha256 = "sha256-yJgF9vTWTbIe2Wb9oTj4pe16T9vBqO4ynOG3Tjx02p4=";
};
});
msgpack = pysuper.msgpack.overrideAttrs (oldAttrs: rec {
pname = oldAttrs.pname;
version = "0.5.6";
src = pyself.fetchPypi {
inherit pname version;
sha256 = "sha256-DujIyFqmUb46oM0AW1kxdp6qZYyUjOeUKHZvG9Rq4sM=";
};
doCheck = false;
installCheckPhase = "";
});
#python-dateutil = pysuper.python-dateutil.overrideAttrs (oldAttrs: rec {
# pname = oldAttrs.pname;
# version = "2.8.0";
# src = pyself.fetchPypi {
# inherit pname version;
# sha256 = "sha256-yJgF9vTWTbIe2Wb9oTj4pe16T9vBqO4ynOG3Tjx02p4=";
# };
#});
#msgpack = pysuper.msgpack.overrideAttrs (oldAttrs: rec {
# pname = oldAttrs.pname;
# version = "0.5.6";
# src = pyself.fetchPypi {
# inherit pname version;
# sha256 = "sha256-DujIyFqmUb46oM0AW1kxdp6qZYyUjOeUKHZvG9Rq4sM=";
# };
# doCheck = false;
# installCheckPhase = "";
#});
#certifi = pyself.buildPythonPackage rec {
# version = "2020.6.20";
# pname = "certifi";