2020-12-02 10:32:00 +00:00
|
|
|
{ lib, fetchFromGitHub, python3Packages }:
|
2019-07-15 10:47:58 +01:00
|
|
|
|
2020-12-02 10:32:00 +00:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2019-07-15 10:47:58 +01:00
|
|
|
pname = "q-text-as-data";
|
2020-12-02 10:32:00 +00:00
|
|
|
version = "2.0.19";
|
2019-07-15 10:47:58 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "harelba";
|
|
|
|
repo = "q";
|
|
|
|
rev = version;
|
2020-12-02 10:32:00 +00:00
|
|
|
sha256 = "18cwyfjgxxavclyd08bmb943c8bvzp1gnqp4klkq5xlgqwivr4sv";
|
2019-07-15 10:47:58 +01:00
|
|
|
};
|
|
|
|
|
2020-12-02 10:32:00 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
setuptools
|
|
|
|
six
|
|
|
|
];
|
2019-07-15 10:47:58 +01:00
|
|
|
|
2020-12-02 10:32:00 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
# remove broken symlink
|
|
|
|
rm bin/qtextasdata.py
|
|
|
|
|
|
|
|
# not considered good practice pinning in install_requires
|
|
|
|
substituteInPlace setup.py --replace 'six==' 'six>='
|
2019-07-15 10:47:58 +01:00
|
|
|
'';
|
|
|
|
|
2020-12-02 10:32:00 +00:00
|
|
|
meta = with lib; {
|
2019-07-15 10:47:58 +01:00
|
|
|
description = "Run SQL directly on CSV or TSV files";
|
|
|
|
longDescription = ''
|
|
|
|
q is a command line tool that allows direct execution of SQL-like queries on CSVs/TSVs (and any other tabular text files).
|
|
|
|
|
|
|
|
q treats ordinary files as database tables, and supports all SQL constructs, such as WHERE, GROUP BY, JOINs etc. It supports automatic column name and column type detection, and provides full support for multiple encodings.
|
|
|
|
'';
|
|
|
|
homepage = "http://harelba.github.io/q/";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = [ maintainers.taneb ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|