2021-10-17 23:38:58 +01:00
|
|
|
{ nixosTests
|
|
|
|
, pkgs
|
2020-03-27 23:10:29 +00:00
|
|
|
, poetry2nix
|
|
|
|
, lib
|
|
|
|
, overrides ? (self: super: {})
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
interpreter = (
|
|
|
|
poetry2nix.mkPoetryPackages {
|
|
|
|
projectDir = ./.;
|
|
|
|
overrides = [
|
|
|
|
poetry2nix.defaultPoetryOverrides
|
|
|
|
(import ./poetry-git-overlay.nix { inherit pkgs; })
|
|
|
|
(
|
|
|
|
self: super: {
|
|
|
|
|
|
|
|
nixops = super.nixops.overridePythonAttrs (
|
|
|
|
old: {
|
2021-09-20 13:58:18 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace nixops/args.py --subst-var version
|
|
|
|
'';
|
|
|
|
|
2020-03-27 23:10:29 +00:00
|
|
|
meta = old.meta // {
|
2021-11-10 10:37:56 +00:00
|
|
|
homepage = "https://github.com/NixOS/nixops";
|
2020-03-27 23:10:29 +00:00
|
|
|
description = "NixOS cloud provisioning and deployment tool";
|
|
|
|
maintainers = with lib.maintainers; [ adisbladis aminechikhaoui eelco rob domenkozar ];
|
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
license = lib.licenses.lgpl3;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
# User provided overrides
|
|
|
|
overrides
|
|
|
|
|
|
|
|
# Make nixops pluginable
|
|
|
|
(self: super: {
|
|
|
|
nixops = super.__toPluginAble {
|
|
|
|
drv = super.nixops;
|
|
|
|
finalDrv = self.nixops;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ self.sphinx ];
|
|
|
|
postInstall = ''
|
|
|
|
doc_cache=$(mktemp -d)
|
|
|
|
sphinx-build -b man -d $doc_cache doc/ $out/share/man/man1
|
|
|
|
|
|
|
|
html=$(mktemp -d)
|
|
|
|
sphinx-build -b html -d $doc_cache doc/ $out/share/nixops/doc
|
|
|
|
'';
|
|
|
|
|
|
|
|
};
|
|
|
|
})
|
|
|
|
|
|
|
|
];
|
|
|
|
}
|
|
|
|
).python;
|
|
|
|
|
2021-10-17 23:38:58 +01:00
|
|
|
pkg = interpreter.pkgs.nixops.withPlugins(ps: [
|
|
|
|
ps.nixops-aws
|
2021-11-18 11:26:03 +00:00
|
|
|
ps.nixops-digitalocean
|
2021-11-18 11:15:01 +00:00
|
|
|
ps.nixops-encrypted-links
|
2021-10-17 23:38:58 +01:00
|
|
|
ps.nixops-gcp
|
2021-11-18 11:15:01 +00:00
|
|
|
ps.nixops-hercules-ci
|
2021-11-18 11:17:43 +00:00
|
|
|
ps.nixops-hetzner
|
2021-10-17 23:38:58 +01:00
|
|
|
ps.nixopsvbox
|
2021-11-18 11:15:01 +00:00
|
|
|
ps.nixops-virtd
|
2021-10-17 23:38:58 +01:00
|
|
|
]) // rec {
|
|
|
|
# Workaround for https://github.com/NixOS/nixpkgs/issues/119407
|
|
|
|
# TODO after #1199407: Use .overrideAttrs(pkg: old: { passthru.tests = .....; })
|
|
|
|
tests = nixosTests.nixops.unstable.override { nixopsPkg = pkg; };
|
|
|
|
# Not strictly necessary, but probably expected somewhere; part of the workaround:
|
|
|
|
passthru.tests = tests;
|
|
|
|
};
|
|
|
|
in pkg
|