docker-compose: move condition to package

make the default.nix self-sufficient
This commit is contained in:
zimbatm 2019-03-16 14:43:16 +01:00
parent f31c910416
commit f9c33c375e
No known key found for this signature in database
GPG key ID: 71BAF6D40C1D63D7
2 changed files with 8 additions and 9 deletions

View file

@ -1,6 +1,11 @@
{ buildCLIImage
, docker-compose
, docker-compose ? null
, python3Packages
}:
buildCLIImage {
drv = docker-compose;
drv =
if docker-compose == null
then python3Packages.docker_compose
else docker-compose # nixos 19.03+
;
}

View file

@ -8,13 +8,7 @@ _: pkgs: {
bash = pkgs.callPackage ./bash {};
busybox = pkgs.callPackage ./busybox {};
curl = pkgs.callPackage ./curl {};
docker-compose = pkgs.callPackage ./docker-compose {
docker-compose =
# master
pkgs.docker-compose or
# 18.09 or later
pkgs.python3Packages.docker_compose;
};
docker-compose = pkgs.callPackage ./docker-compose {};
kubectl = pkgs.callPackage ./kubectl {};
kubernetes-helm = pkgs.callPackage ./kubernetes-helm {};
nix = pkgs.callPackage ./nix {};