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": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1648219316, "lastModified": 1657649905,
"narHash": "sha256-Ctij+dOi0ZZIfX5eMhgwugfvB+WZSrvVNAyAuANOsnQ=", "narHash": "sha256-gth8ki7Sme/DjUc/hXBHpn+cvQSx9oTLCXUjQbbrn3M=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "30d3d79b7d3607d56546dd2a6b49e156ba0ec634", "rev": "09066922296d9ef06bfadb937b2560524dd10785",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

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

View File

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

View File

@ -1,27 +1,26 @@
{pkgs, dbt-core, version}:
{pkgs, dbt-core}:
with pkgs; with pkgs;
with python39Packages; with python39Packages;
let inputs = [ let inputs = [
dbt-core dbt-core
typing-extensions typing-extensions
jinja2 jinja2
psycopg2 psycopg2_2_8
]; ];
in in
buildPythonPackage rec { buildPythonPackage rec {
pname = "dbt-postgres"; pname = "dbt-postgres";
version = "1.0.0"; inherit version;
buildInputs = inputs; buildInputs = inputs;
propagatedBuildInputs = inputs; propagatedBuildInputs = inputs;
doCheck = false; doCheck = false;
# This is gross but I couldn't figure out how to set an environment variable # This is gross but I couldn't figure out how to set an environment variable
# to configure this properly. # to configure this properly.
patchPhase = '' patchPhase = ''
sed -ibak "s/return 'psycopg2-binary'/return 'psycopg2'/" setup.py sed -ibak "s/psycopg2-binary/psycopg2/" setup.py
''; '';
src = fetchPypi { src = fetchPypi {
inherit pname version; 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 pkgs;
with python39Packages; with python39Packages;
let inputs = [ let inputs = [
@ -15,12 +15,12 @@ let inputs = [
in in
buildPythonPackage rec { buildPythonPackage rec {
pname = "dbt-redshift"; pname = "dbt-redshift";
version = "1.0.0"; inherit version;
buildInputs = inputs; buildInputs = inputs;
propagatedBuildInputs = inputs; propagatedBuildInputs = inputs;
doCheck = false; doCheck = false;
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "sha256-ZBkhKxxUA1jyubMkCPzmvqyTh8QPgQ2Y33gEOV6Sc78="; sha256 = "sha256-CNkCORCVdAtE14CxKGpheXkOq4QyTq/huR0IWQzHWmI=";
}; };
} }

View File

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

View File

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