2020-04-24 23:36:52 +00:00
|
|
|
{ lib, python2Packages, libxslt, docbook_xsl_ns, openssh, cacert, nixopsAzurePackages ? []
|
|
|
|
# version args
|
|
|
|
, src, version
|
|
|
|
, meta ? {}
|
2020-11-06 00:33:48 +00:00
|
|
|
, patches ? null
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
python2Packages.buildPythonApplication {
|
|
|
|
name = "nixops-${version}";
|
2020-11-06 00:33:48 +00:00
|
|
|
inherit version src patches;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [ libxslt ];
|
|
|
|
|
|
|
|
pythonPath = with python2Packages;
|
|
|
|
[ prettytable
|
|
|
|
boto
|
|
|
|
boto3
|
|
|
|
hetzner
|
|
|
|
libcloud
|
|
|
|
adal
|
|
|
|
# Go back to sqlite once Python 2.7.13 is released
|
|
|
|
pysqlite
|
|
|
|
datadog
|
|
|
|
digital-ocean
|
|
|
|
libvirt
|
|
|
|
typing
|
|
|
|
] ++ nixopsAzurePackages;
|
|
|
|
|
|
|
|
checkPhase =
|
|
|
|
# Ensure, that there are no (python) import errors
|
|
|
|
''
|
|
|
|
SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt \
|
|
|
|
HOME=$(pwd) \
|
|
|
|
$out/bin/nixops --version
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
make -C doc/manual install nixops.1 docbookxsl=${docbook_xsl_ns}/xml/xsl/docbook \
|
|
|
|
docdir=$out/share/doc/nixops mandir=$out/share/man
|
|
|
|
|
|
|
|
mkdir -p $out/share/nix/nixops
|
|
|
|
cp -av "nix/"* $out/share/nix/nixops
|
|
|
|
|
|
|
|
# Add openssh to nixops' PATH. On some platforms, e.g. CentOS and RHEL
|
|
|
|
# the version of openssh is causing errors when have big networks (40+)
|
|
|
|
wrapProgram $out/bin/nixops --prefix PATH : "${openssh}/bin"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/NixOS/nixops";
|
|
|
|
description = "NixOS cloud provisioning and deployment tool";
|
|
|
|
maintainers = with lib.maintainers; [ aminechikhaoui eelco rob domenkozar ];
|
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
license = lib.licenses.lgpl3;
|
|
|
|
} // meta;
|
|
|
|
}
|