nixpkgs/pkgs/applications/misc/visidata/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

98 lines
2.0 KiB
Nix
Raw Normal View History

2021-06-16 00:01:11 +00:00
{ stdenv
, lib
2021-06-16 00:01:11 +00:00
, buildPythonApplication
, fetchFromGitHub
, python-dateutil
2021-06-15 23:59:37 +00:00
, pandas
, requests
, lxml
, openpyxl
, xlrd
, h5py
2021-11-15 06:38:14 +00:00
, odfpy
2021-06-15 23:59:37 +00:00
, psycopg2
, pyshp
2021-06-15 23:59:37 +00:00
, fonttools
, pyyaml
, pdfminer-six
2021-06-15 23:59:37 +00:00
, vobject
, tabulate
, wcwidth
, zstandard
, setuptools
2021-06-16 00:01:11 +00:00
, git
2021-06-15 23:59:37 +00:00
, withPcap ? true, dpkt, dnslib
2018-10-23 09:00:00 +00:00
}:
buildPythonApplication rec {
pname = "visidata";
2021-12-17 11:18:09 +00:00
version = "2.8";
2018-10-23 09:00:00 +00:00
src = fetchFromGitHub {
owner = "saulpw";
repo = "visidata";
rev = "v${version}";
2021-12-17 11:18:09 +00:00
sha256 = "1lcx444yrzmcvix977cgaf18lfrf9yrn2r14ln7knx8ghc15vkqb";
2018-10-23 09:00:00 +00:00
};
propagatedBuildInputs = [
2021-06-15 23:59:37 +00:00
# from visidata/requirements.txt
# packages not (yet) present in nixpkgs are commented
python-dateutil
2021-06-15 23:59:37 +00:00
pandas
requests
lxml
openpyxl
xlrd
h5py
2021-06-15 23:59:37 +00:00
psycopg2
pyshp
2021-06-15 23:59:37 +00:00
#mapbox-vector-tile
#pypng
fonttools
#sas7bdat
#xport
#savReaderWriter
pyyaml
#namestand
#datapackage
pdfminer-six
2021-06-15 23:59:37 +00:00
#tabula
vobject
tabulate
wcwidth
zstandard
2021-11-15 06:38:14 +00:00
odfpy
setuptools
] ++ lib.optionals withPcap [ dpkt dnslib ];
2018-10-23 09:00:00 +00:00
2021-06-16 00:01:11 +00:00
checkInputs = [
git
];
# check phase uses the output bin, which is not possible when cross-compiling
doCheck = stdenv.buildPlatform == stdenv.hostPlatform;
checkPhase = ''
# disable some tests which require access to the network
rm tests/load-http.vd # http
rm tests/graph-cursor-nosave.vd # http
rm tests/messenger-nosave.vd # dns
# tests use git to compare outputs to references
git init -b "test-reference"
git config user.name "nobody"; git config user.email "no@where"
git add .; git commit -m "test reference"
substituteInPlace dev/test.sh --replace "bin/vd" "$out/bin/vd"
bash dev/test.sh
'';
2018-10-23 09:00:00 +00:00
meta = {
description = "Interactive terminal multitool for tabular data";
license = lib.licenses.gpl3;
2021-11-16 08:57:38 +00:00
maintainers = with lib.maintainers; [ raskin markus1189 ];
2018-10-23 09:00:00 +00:00
homepage = "http://visidata.org/";
2021-02-03 13:50:53 +00:00
changelog = "https://github.com/saulpw/visidata/blob/v${version}/CHANGELOG.md";
2018-10-23 09:00:00 +00:00
};
}