From ddefb5f067f08d0846e82c60ac44a8791930be66 Mon Sep 17 00:00:00 2001 From: Nathan van Doorn Date: Mon, 15 Jul 2019 10:47:58 +0100 Subject: [PATCH] q-text-as-data: init at 1.7.1 --- pkgs/tools/misc/q-text-as-data/default.nix | 35 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/tools/misc/q-text-as-data/default.nix diff --git a/pkgs/tools/misc/q-text-as-data/default.nix b/pkgs/tools/misc/q-text-as-data/default.nix new file mode 100644 index 000000000000..dbd4a4c465ca --- /dev/null +++ b/pkgs/tools/misc/q-text-as-data/default.nix @@ -0,0 +1,35 @@ +{ stdenvNoCC, fetchFromGitHub, python2 }: + +stdenvNoCC.mkDerivation rec { + pname = "q-text-as-data"; + version = "1.7.1"; + + src = fetchFromGitHub { + owner = "harelba"; + repo = "q"; + rev = version; + sha256 = "021c2sd6qscz1ipwzzjf43pfd311dcay7yralksl25rs0r7h3li2"; + }; + + buildInputs = [ python2 ]; + dontBuild = true; + + installPhase = '' + mkdir -p $out/bin + cp bin/q $out/bin + chmod +x $out/bin/q + ''; + + meta = with stdenvNoCC.lib; { + 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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1cab1ae328b0..6b574576b135 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5715,6 +5715,8 @@ in ocz-ssd-guru = callPackage ../tools/misc/ocz-ssd-guru { }; + q-text-as-data = callPackage ../tools/misc/q-text-as-data { }; + qalculate-gtk = callPackage ../applications/science/math/qalculate-gtk { }; qastools = libsForQt5.callPackage ../tools/audio/qastools { };