2019-04-17 07:18:03 -07:00
|
|
|
{ lib, python2Packages, libxslt, docbook_xsl_ns, openssh, cacert, nixopsAzurePackages ? []
|
2015-12-18 09:51:01 -08:00
|
|
|
# version args
|
|
|
|
, src, version
|
2019-03-03 02:16:13 -08:00
|
|
|
, meta ? {}
|
2015-12-18 09:51:01 -08:00
|
|
|
}:
|
|
|
|
|
2016-10-19 08:46:31 -07:00
|
|
|
python2Packages.buildPythonApplication {
|
2015-12-18 09:51:01 -08:00
|
|
|
name = "nixops-${version}";
|
2017-05-18 02:40:27 -07:00
|
|
|
inherit version src;
|
2015-12-18 09:51:01 -08:00
|
|
|
|
|
|
|
buildInputs = [ libxslt ];
|
|
|
|
|
2016-10-19 08:46:31 -07:00
|
|
|
pythonPath = with python2Packages;
|
|
|
|
[ prettytable
|
|
|
|
boto
|
2016-11-23 08:35:20 -08:00
|
|
|
boto3
|
2016-10-19 08:46:31 -07:00
|
|
|
hetzner
|
|
|
|
libcloud
|
|
|
|
adal
|
2017-02-16 09:01:56 -08:00
|
|
|
# Go back to sqlite once Python 2.7.13 is released
|
|
|
|
pysqlite
|
2016-11-23 08:35:20 -08:00
|
|
|
datadog
|
2017-02-16 09:01:56 -08:00
|
|
|
digital-ocean
|
2018-03-28 04:04:55 -07:00
|
|
|
libvirt
|
2018-11-17 13:23:24 -08:00
|
|
|
typing
|
2019-04-17 07:18:03 -07:00
|
|
|
] ++ nixopsAzurePackages;
|
2015-12-18 09:51:01 -08:00
|
|
|
|
2019-01-10 08:44:49 -08:00
|
|
|
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
|
|
|
|
'';
|
2015-12-18 09:51:01 -08:00
|
|
|
|
2017-05-18 02:40:27 -07:00
|
|
|
postInstall = ''
|
2018-07-17 13:11:16 -07:00
|
|
|
make -C doc/manual install nixops.1 docbookxsl=${docbook_xsl_ns}/xml/xsl/docbook \
|
2017-05-18 02:40:27 -07:00
|
|
|
docdir=$out/share/doc/nixops mandir=$out/share/man
|
2015-12-18 09:51:01 -08:00
|
|
|
|
2017-05-18 02:40:27 -07:00
|
|
|
mkdir -p $out/share/nix/nixops
|
|
|
|
cp -av "nix/"* $out/share/nix/nixops
|
2015-12-18 09:51:01 -08:00
|
|
|
|
2017-05-18 02:40:27 -07:00
|
|
|
# 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"
|
|
|
|
'';
|
2015-12-18 09:51:01 -08:00
|
|
|
|
|
|
|
meta = {
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://github.com/NixOS/nixops";
|
2015-12-18 09:51:01 -08:00
|
|
|
description = "NixOS cloud provisioning and deployment tool";
|
2019-04-17 07:18:03 -07:00
|
|
|
maintainers = with lib.maintainers; [ aminechikhaoui eelco rob domenkozar ];
|
2015-12-18 09:51:01 -08:00
|
|
|
platforms = lib.platforms.unix;
|
2018-08-09 03:51:48 -07:00
|
|
|
license = lib.licenses.lgpl3;
|
2019-03-03 02:16:13 -08:00
|
|
|
} // meta;
|
2015-12-18 09:51:01 -08:00
|
|
|
}
|