2021-04-02 12:29:10 +02:00
|
|
|
{ lib
|
|
|
|
, attrs
|
|
|
|
, boto3
|
|
|
|
, buildPythonPackage
|
|
|
|
, click-completion
|
|
|
|
, click-didyoumean
|
|
|
|
, click-help-colors
|
|
|
|
, colorama
|
|
|
|
, fetchPypi
|
|
|
|
, gradient_statsd
|
|
|
|
, gradient-utils
|
|
|
|
, halo
|
|
|
|
, marshmallow
|
|
|
|
, progressbar2
|
|
|
|
, pyopenssl
|
|
|
|
, pyyaml
|
|
|
|
, requests
|
2021-07-20 23:21:18 +02:00
|
|
|
, requests-toolbelt
|
2021-04-02 12:29:10 +02:00
|
|
|
, terminaltables
|
2021-06-15 13:12:45 +02:00
|
|
|
, websocket-client
|
2021-01-23 05:28:34 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gradient";
|
2021-10-09 00:23:03 +02:00
|
|
|
version = "1.8.9";
|
2021-01-23 05:28:34 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-10-09 00:23:03 +02:00
|
|
|
sha256 = "c05913efe7fcc9f75c1fe84c157d2c2cf3ec0983e132d418c6e59fabc6361a1e";
|
2021-01-23 05:28:34 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace 'attrs<=' 'attrs>=' \
|
|
|
|
--replace 'colorama==' 'colorama>=' \
|
|
|
|
--replace 'PyYAML==' 'PyYAML>=' \
|
2021-03-16 09:40:40 +01:00
|
|
|
--replace 'marshmallow<' 'marshmallow>=' \
|
|
|
|
--replace 'websocket-client==' 'websocket-client>='
|
2021-04-02 12:29:10 +02:00
|
|
|
'';
|
2021-01-23 05:28:34 +01:00
|
|
|
|
2021-04-02 12:29:10 +02:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
attrs
|
|
|
|
boto3
|
|
|
|
click-completion
|
|
|
|
click-didyoumean
|
|
|
|
click-help-colors
|
|
|
|
colorama
|
|
|
|
gradient_statsd
|
|
|
|
gradient-utils
|
|
|
|
halo
|
|
|
|
marshmallow
|
|
|
|
progressbar2
|
|
|
|
pyopenssl
|
|
|
|
pyyaml
|
|
|
|
requests
|
2021-07-20 23:21:18 +02:00
|
|
|
requests-toolbelt
|
2021-04-02 12:29:10 +02:00
|
|
|
terminaltables
|
2021-06-15 13:12:45 +02:00
|
|
|
websocket-client
|
2021-01-23 05:28:34 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
# tries to use /homeless-shelter to mimic container usage, etc
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "The command line interface for Gradient";
|
2021-04-02 12:29:10 +02:00
|
|
|
homepage = "https://github.com/Paperspace/gradient-cli";
|
|
|
|
license = licenses.isc;
|
|
|
|
platforms = platforms.unix;
|
2021-01-23 05:28:34 +01:00
|
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
2021-09-23 10:45:38 +02:00
|
|
|
# There is no support for click > 8
|
|
|
|
# https://github.com/Paperspace/gradient-cli/issues/368
|
|
|
|
broken = true;
|
2021-01-23 05:28:34 +01:00
|
|
|
};
|
|
|
|
}
|