
This reverts commit 65a333600d5c88a98d674f637d092807cfc12253. This wasn't tested for correctness with something like fodwatch [0], and should not have been (self-)merged so quickly, especially without further review. It also resulted in the breakage of at least one package [1] (and that's the one we know of and was caught). A few packages that were updated in between this commit and this revert were not reverted back to using `rev`, but other than that, this is a 1:1 revert. [0]: https://codeberg.org/raphaelr/fodwatch [1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e4587d75882aebc21a04bee960418f8ce9
74 lines
1.3 KiB
Nix
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";
|
|
};
|
|
}
|