66 testers ,
77 nix-update-script ,
88 versionCheckHook ,
9+ glibcLocales ,
910 withPostgresAdapter ? true ,
1011 withBigQueryAdapter ? true ,
1112} :
@@ -21,34 +22,32 @@ python3Packages.buildPythonApplication rec {
2122 hash = "sha256-ov9pMvFzJAMfOM7JeSgnp6dZ424GiRaH7W5OCKin9Jk=" ;
2223 } ;
2324
24- build-system = with python3Packages ; [
25- poetry-core
26- ] ;
25+ pythonRelaxDeps = [ "textual" ] ;
26+
27+ build-system = with python3Packages ; [ poetry-core ] ;
28+
29+ nativeBuildInputs = [ glibcLocales ] ;
2730
2831 dependencies =
2932 with python3Packages ;
3033 [
31- textual
32- textual-fastdatatable
33- textual-textarea
3434 click
35- rich-click
3635 duckdb
37- sqlfmt
38- platformdirs
3936 importlib-metadata
40- tomlkit
41- questionary
4237 numpy
4338 packaging
39+ platformdirs
40+ questionary
41+ rich-click
42+ sqlfmt
43+ textual
44+ textual-fastdatatable
45+ textual-textarea
46+ tomlkit
4447 ]
4548 ++ lib . optionals withPostgresAdapter [ harlequin-postgres ]
4649 ++ lib . optionals withBigQueryAdapter [ harlequin-bigquery ] ;
4750
48- pythonRelaxDeps = [
49- "textual"
50- ] ;
51-
5251 pythonImportsCheck = [
5352 "harlequin"
5453 "harlequin_duckdb"
@@ -60,17 +59,37 @@ python3Packages.buildPythonApplication rec {
6059 updateScript = nix-update-script { } ;
6160 } ;
6261
63- nativeCheckInputs = [
64- versionCheckHook
62+ preCheck = ''
63+ export HOME=$(mktemp -d)
64+ '' ;
65+
66+ nativeCheckInputs =
67+ [
68+ versionCheckHook
69+ ]
70+ ++ ( with python3Packages ; [
71+ pytest-asyncio
72+ pytestCheckHook
73+ ] ) ;
74+
75+ disabledTests = [
76+ # Tests require network access
77+ "test_connect_extensions"
78+ "test_connect_prql"
79+ ] ;
80+
81+ disabledTestPaths = [
82+ # Tests requires more setup
83+ "tests/functional_tests/"
6584 ] ;
6685
6786 meta = {
6887 description = "The SQL IDE for Your Terminal" ;
6988 homepage = "https://harlequin.sh" ;
70- mainProgram = "harlequin" ;
89+ changelog = "https://github.com/tconbeer/ harlequin/releases/tag/v ${ version } " ;
7190 license = lib . licenses . mit ;
91+ mainProgram = "harlequin" ;
7292 maintainers = with lib . maintainers ; [ pcboy ] ;
7393 platforms = lib . platforms . unix ;
74- changelog = "https://github.com/tconbeer/harlequin/releases/tag/v${ version } " ;
7594 } ;
7695}
0 commit comments