From cd72a8c346ca752441327cce4a2e94a2b38055bd Mon Sep 17 00:00:00 2001 From: Rok Garbas Date: Tue, 23 Nov 2021 11:31:05 +0100 Subject: [PATCH] Make docker image downloadable in Hydra UI --- flake.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 01afc23c3..8a90de5e2 100644 --- a/flake.nix +++ b/flake.nix @@ -407,10 +407,18 @@ # docker image with Nix inside dockerImage = nixpkgs.lib.genAttrs linux64BitSystems (system: - import ./docker.nix { + let pkgs = nixpkgsFor.${system}; - tag = version; - }); + image = import ./docker.nix { inherit pkgs; tag = version; }; + in pkgs.runCommand "docker-image-tarball-${version}" + { meta.description = "Docker image with Nix for ${system}"; + } + '' + mkdir -p $out/nix-support + image=$out/image.tar.gz + cp ${image} $image + echo "file binary-dist $image" >> $out/nix-support/hydra-build-products + ''); # Line coverage analysis. coverage =