3 , buildPythonApplication
42 , withPcap ? true, dpkt, dnslib
43 , withXclip ? stdenv.hostPlatform.isLinux, xclip
47 buildPythonApplication rec {
51 src = fetchFromGitHub {
55 hash = "sha256-gplrkrFTIP6TLvk1YazD5roDzsPvDtOXLlTOmTio52s=";
59 # Drop when next release is out
61 name = "drop-support-for-python-37.patch";
62 url = "https://github.com/saulpw/visidata/commit/738bb8b43814c14b1b8a1f1f60397c1520c5ef4a.patch";
63 hash = "sha256-5jDAzKMuW3s7BCGpWyLcS4Lw8GUbjNxVhF5mUKbR1YY=";
66 name = "update-tests-for-python-312.patch";
67 url = "https://github.com/saulpw/visidata/commit/627f6f126cdd49bcdda0bbc16fab42eb5bd42103.patch";
68 hash = "sha256-3FHgjLrzMHObEheJoRY8VlnDUtDZ68FqCqAyhP7333E=";
72 propagatedBuildInputs = [
73 # from visidata/requirements.txt
74 # packages not (yet) present in nixpkgs are commented
121 ] ++ lib.optionals withPcap [ dpkt dnslib ]
122 ++ lib.optional withXclip xclip;
124 nativeCheckInputs = [
128 # check phase uses the output bin, which is not possible when cross-compiling
129 doCheck = stdenv.buildPlatform == stdenv.hostPlatform;
134 # disable some tests which require access to the network
135 rm -f tests/load-http.vd # http
136 rm -f tests/graph-cursor-nosave.vd # http
137 rm -f tests/messenger-nosave.vd # dns
139 # tests to disable because we don't have a package to load such files
140 rm -f tests/load-conllu.vdj # no 'pyconll'
141 rm -f tests/load-sav.vd # no 'savReaderWriter'
143 # tests use git to compare outputs to references
144 git init -b "test-reference"
145 git config user.name "nobody"
146 git config user.email "no@where"
148 git commit -m "test reference"
150 substituteInPlace dev/test.sh --replace "bin/vd" "$out/bin/vd"
155 python dev/zsh-completion.py
156 install -Dm644 _visidata -t $out/share/zsh/site-functions
159 pythonImportsCheck = ["visidata"];
161 passthru.tests.version = testers.testVersion {
163 version = "v${version}";
167 description = "Interactive terminal multitool for tabular data";
168 license = lib.licenses.gpl3;
169 maintainers = with lib.maintainers; [ raskin markus1189 ];
170 homepage = "https://visidata.org/";
171 changelog = "https://github.com/saulpw/visidata/blob/v${version}/CHANGELOG.md";