diff options
author | Aleksana <me@aleksana.moe> | 2024-04-09 17:30:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-09 17:30:10 +0800 |
commit | be50b0bc1b67beb1255bf35a1df9de29652ea521 (patch) | |
tree | 9bb1a3286e9336928e6e56d142d5a8d30d83403d /pkgs/by-name | |
parent | 3fedc8e53cf06db8bb871afaf335c02260f3d8f0 (diff) | |
parent | f57298689f96433087c51891148e2f5b7908aef0 (diff) |
Merge pull request #301972 from twitchy0/ngrid
ngrid: init at 0.1.0
Diffstat (limited to 'pkgs/by-name')
-rw-r--r-- | pkgs/by-name/ng/ngrid/package.nix | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/pkgs/by-name/ng/ngrid/package.nix b/pkgs/by-name/ng/ngrid/package.nix new file mode 100644 index 0000000000000..b609689663ec2 --- /dev/null +++ b/pkgs/by-name/ng/ngrid/package.nix @@ -0,0 +1,69 @@ +{ lib +, fetchFromGitHub +, python3 +, expect +}: + +python3.pkgs.buildPythonApplication rec { + pname = "ngrid"; + version = "0.1.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "twosigma"; + repo = "ngrid"; + rev = version; + hash = "sha256-69icp0m+bAHBsQFIDGd8NjfMsMYsB1sUfzuP/OBl5jc="; + }; + + nativeBuildInputs = [ + python3.pkgs.setuptools + python3.pkgs.wheel + ]; + + propagatedBuildInputs = [ + python3.pkgs.six + python3.pkgs.numpy + python3.pkgs.pytz + python3.pkgs.pandas + ]; + + pythonImportsCheck = [ "ngrid.main" ]; + + nativeCheckInputs = [ python3.pkgs.pytest expect ]; + checkPhase = '' + runHook preCheck + + pytest test/formatters.py + + echo -e "a,b,c\n1.98423,some string,5824.2" > test.csv + + expect <<EOD + exp_internal 1 + set timeout 3 + spawn $out/bin/ngrid test.csv + + expect { + "Traceback" { exit 1 } + timeout { } + } + + send "q" + + expect { + "Traceback" { exit 1 } + eof { exit 0 } + } + EOD + + runHook postCheck + ''; + + meta = with lib; { + description = "It's \"less\" for data"; + homepage = "https://github.com/twosigma/ngrid"; + license = licenses.bsd3; + maintainers = with maintainers; [ twitchy0 ]; + mainProgram = "ngrid"; + }; +} |