Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkgs/development/libraries/libuv/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ stdenv.mkDerivation rec {
"threadpool_multiple_event_loops" # times out on slow machines
"get_passwd" # passed on NixOS but failed on other Linuxes
"tcp_writealot" # times out sometimes
"ipc_closed_handle" # times out
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"ipc_closed_handle" # times out

avoid mass rebuild

] ++ stdenv.lib.optionals stdenv.isDarwin [
# Sometimes: timeout (no output), failed uv_listen. Someone
# should report these failures to libuv team. There tests should
Expand Down
50 changes: 50 additions & 0 deletions pkgs/development/python-modules/pydruid/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pandas
, prompt_toolkit
, pycurl
, pygments
, pytest
, pytestrunner
, requests
, six
, sqlalchemy
, tabulate
, tornado
}:

buildPythonPackage rec {
pname = "pydruid";
version = "0.5.8";

src = fetchFromGitHub {
owner = "druid-io";
repo = pname;
rev = version;
sha256 = "0zb6zmklib26fzv5dvqzy0h0p1ljjgkklnjm66imc35mx5irpzcv";
};

patchPhase = ''
Copy link
Copy Markdown
Contributor

@jonringer jonringer Feb 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default patchPhase does a lot of things for you

Suggested change
patchPhase = ''
postPatch = ''

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, I should change other commits, since I used patchPhase instead of postPatch.
Will do it.

# timestamp is added to the end of the list, and dict keeps keys in insertion order
substituteInPlace tests/test_query.py --replace \
"def expected_results_csv_reader():" "
EXPECTED_RESULTS_PANDAS = list(map(lambda x: dict(list(x.items())[1:] + [list(x.items())[0]]), EXPECTED_RESULTS_PANDAS))
def expected_results_csv_reader():"
'';

propagatedBuildInputs = [ pandas prompt_toolkit pycurl pygments requests six sqlalchemy tabulate tornado ];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really long, please list, please make into single item lines

Suggested change
propagatedBuildInputs = [ pandas prompt_toolkit pycurl pygments requests six sqlalchemy tabulate tornado ];
propagatedBuildInputs = [
pandas
prompt_toolkit
...
];

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, is there a limit somewhere? (it fits to half screen for me so, below 120 characters - what is the standard max line width before wrapping?)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not really, but generally I do a max of ~3. Just helps with quickly digesting the expression


checkInputs = [ pytest pytestrunner ];

checkPhase = ''
pytest tests
'';

meta = with lib; {
description = "A Python connector for Druid";
homepage = "https://github.com/druid-io/pydruid";
license = licenses.asl20;
maintainers = [ maintainers.arnoldfarkas ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1066,6 +1066,8 @@ in {

pydrive = callPackage ../development/python-modules/pydrive { };

pydruid = callPackage ../development/python-modules/pydruid { };

pydy = callPackage ../development/python-modules/pydy { };

pyexiv2 = disabledIf isPy3k (toPythonModule (callPackage ../development/python-modules/pyexiv2 {}));
Expand Down