1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchPypi,
6 libiconv,
7 pythonOlder,
8 rustPlatform,
9}:
10
11buildPythonPackage rec {
12 pname = "dbt-extractor";
13 version = "0.6.0";
14 pyproject = true;
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchPypi {
19 pname = "dbt_extractor";
20 inherit version;
21 hash = "sha256-1s8I7Hk7i8K9biYO+BgjCuaKT3FDb6SJ8I19saUuL/4=";
22 };
23
24 cargoDeps = rustPlatform.fetchCargoVendor {
25 inherit pname version src;
26 hash = "sha256-6Y4zfqhj1/IeEX+Ve49jblxeW565Q2ypNClb/Ej0xoc=";
27 };
28
29 nativeBuildInputs = [
30 rustPlatform.cargoSetupHook
31 rustPlatform.maturinBuildHook
32 ];
33
34 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
35
36 # no python tests exist
37 doCheck = false;
38
39 pythonImportsCheck = [ "dbt_extractor" ];
40
41 meta = with lib; {
42 description = "Tool that processes the most common jinja value templates in dbt model files";
43 homepage = "https://github.com/dbt-labs/dbt-extractor";
44 changelog = "https://github.com/dbt-labs/dbt-extractor/blob/main/CHANGELOG.md";
45 license = licenses.asl20;
46 maintainers = with maintainers; [
47 mausch
48 tjni
49 ];
50 };
51}