1{ stdenv, fetchFromGitHub, buildPerlPackage, perlPackages, makeWrapper}:
2
3buildPerlPackage rec {
4 name = "linode-cli-${version}";
5 version = "1.4.7";
6
7 src = fetchFromGitHub {
8 owner = "linode";
9 repo = "cli";
10 rev = "v${version}";
11 sha256 = "1wiz067wgxi4z4rz4n9p7dlvx5z4hkl2nxpfvhikl6dri4m2nkkp";
12 };
13
14 buildInputs = [ makeWrapper ];
15 propagatedBuildInputs = with perlPackages; [
16 JSON
17 LWPUserAgent
18 MozillaCA
19 TryTiny
20 WebServiceLinode
21 ];
22
23 # Wrap perl scripts so they can find libraries
24 postInstall = ''
25 for n in "$out/bin"/*; do
26 wrapProgram "$n" --prefix PERL5LIB : "$PERL5LIB"
27 done
28 '';
29
30 # Has no tests
31 doCheck = false;
32
33 # Has no "doc" or "devdoc" outputs
34 outputs = [ "out" ];
35
36 meta = with stdenv.lib; {
37 description = "Command-line interface to the Linode platform";
38 homepage = https://github.com/linode/cli;
39 license = with licenses; [ artistic2 gpl2 ];
40 maintainers = with maintainers; [ nixy ];
41 };
42}