mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
Merge pull request #85238 from ryantm/linode-cli
linode-cli: remove deprecated perl version, init python version at 2.14.1
This commit is contained in:
commit
5b36111f3c
@ -1,42 +1,70 @@
|
|||||||
{ stdenv, fetchFromGitHub, perlPackages, makeWrapper}:
|
{ lib
|
||||||
|
, buildPythonApplication
|
||||||
|
, fetchFromGitHub
|
||||||
|
, fetchpatch
|
||||||
|
, fetchurl
|
||||||
|
, terminaltables
|
||||||
|
, colorclass
|
||||||
|
, requests
|
||||||
|
, pyyaml
|
||||||
|
, setuptools
|
||||||
|
}:
|
||||||
|
|
||||||
perlPackages.buildPerlPackage rec {
|
let
|
||||||
|
|
||||||
|
spec = fetchurl {
|
||||||
|
url = "https://developers.linode.com/api/docs/v4/openapi.yaml";
|
||||||
|
sha256 = "1l2fahdcmv7sp1qkwr5nv2vls8fypvlybwylqfzhyjmn7jqkw4hq";
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
buildPythonApplication rec {
|
||||||
pname = "linode-cli";
|
pname = "linode-cli";
|
||||||
version = "1.4.7";
|
version = "2.14.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "linode";
|
owner = "linode";
|
||||||
repo = "cli";
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = version;
|
||||||
sha256 = "1wiz067wgxi4z4rz4n9p7dlvx5z4hkl2nxpfvhikl6dri4m2nkkp";
|
sha256 = "1hpdmbzs182iag471yvq3kwd1san04a58sczzbmw6vjv2kswn1c2";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ makeWrapper ];
|
patches = [
|
||||||
propagatedBuildInputs = with perlPackages; [
|
# make enum34 depend on python version
|
||||||
JSON
|
( fetchpatch {
|
||||||
LWP
|
url = "https://github.com/linode/linode-cli/pull/184/commits/4cf55759c5da33fbc49b9ba664698875d67d4f76.patch";
|
||||||
MozillaCA
|
sha256 = "04n9a6yh0abyyymvfzajhav6qxwvzjl2vs8jnqp3yqrma7kl0slj";
|
||||||
TryTiny
|
})
|
||||||
WebServiceLinode
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Wrap perl scripts so they can find libraries
|
# remove need for git history
|
||||||
postInstall = ''
|
prePatch = ''
|
||||||
for n in "$out/bin"/*; do
|
substituteInPlace setup.py \
|
||||||
wrapProgram "$n" --prefix PERL5LIB : "$PERL5LIB"
|
--replace "version=get_version()," "version='${version}',"
|
||||||
done
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Has no tests
|
propagatedBuildInputs = [
|
||||||
|
terminaltables
|
||||||
|
colorclass
|
||||||
|
requests
|
||||||
|
pyyaml
|
||||||
|
setuptools
|
||||||
|
];
|
||||||
|
|
||||||
|
postConfigure = ''
|
||||||
|
python3 -m linodecli bake ${spec} --skip-config
|
||||||
|
cp data-3 linodecli/
|
||||||
|
'';
|
||||||
|
|
||||||
|
# requires linode access token for unit tests, and running executable
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
# Has no "doc" or "devdoc" outputs
|
meta = with lib; {
|
||||||
outputs = [ "out" ];
|
homepage = "https://github.com/linode/linode-cli";
|
||||||
|
description = "The Linode Command Line Interface";
|
||||||
meta = with stdenv.lib; {
|
license = licenses.bsd3;
|
||||||
description = "Command-line interface to the Linode platform";
|
maintainers = with maintainers; [ ryantm ];
|
||||||
homepage = "https://github.com/linode/cli";
|
|
||||||
license = with licenses; [ artistic2 gpl2 ];
|
|
||||||
maintainers = with maintainers; [ nixy ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -26299,7 +26299,7 @@ in
|
|||||||
|
|
||||||
xib2nib = callPackage ../development/tools/xib2nib {};
|
xib2nib = callPackage ../development/tools/xib2nib {};
|
||||||
|
|
||||||
linode-cli = callPackage ../tools/virtualization/linode-cli { };
|
linode-cli = python3Packages.callPackage ../tools/virtualization/linode-cli {};
|
||||||
|
|
||||||
hss = callPackage ../tools/networking/hss {};
|
hss = callPackage ../tools/networking/hss {};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user