Files
nixpkgs/pkgs/development/python-modules/kaggle/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

68 lines
1.3 KiB
Nix

{
bleach,
buildPythonPackage,
certifi,
charset-normalizer,
fetchPypi,
hatchling,
idna,
lib,
python-dateutil,
python-slugify,
requests,
setuptools,
six,
text-unidecode,
tqdm,
urllib3,
webencodings,
protobuf,
}:
buildPythonPackage rec {
pname = "kaggle";
version = "1.7.4.5";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-HZghvWpqFHB0HHbSZJWhhHW1p7/gyAsZGRJUsnNdQd0=";
};
build-system = [ hatchling ];
dependencies = [
bleach
certifi
charset-normalizer
idna
python-dateutil
python-slugify
requests
setuptools
six
text-unidecode
tqdm
urllib3
webencodings
protobuf
];
# Tests try to access the network.
checkPhase = ''
export HOME="$TMP"
mkdir -p "$HOME/.kaggle/"
echo '{"username":"foobar","key":"00000000000000000000000000000000"}' > "$HOME/.kaggle/kaggle.json"
$out/bin/kaggle --help > /dev/null
'';
pythonImportsCheck = [ "kaggle" ];
meta = {
description = "Official API for https://www.kaggle.com, accessible using a command line tool implemented in Python 3";
mainProgram = "kaggle";
homepage = "https://github.com/Kaggle/kaggle-api";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ mbalatsko ];
};
}