Files
nixpkgs/pkgs/by-name/ng/ngrid/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

74 lines
1.3 KiB
Nix

{
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";
};
}