aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-11-24 11:12:53 +0100
committerGitHub <noreply@github.com>2021-11-24 11:12:53 +0100
commit585e97fa51313ec01b227d87ed1501dc94f04ffe (patch)
treef97dc49030193473871a080c84302f3f1fda699a
parentee5f2917090a3c236f662ff0b2cec398d5ab3c9b (diff)
parent7a2c88add66a7d01743866733ca55c577f4b7ff3 (diff)
Merge pull request #5632 from NixOS/downloadable-docker-image
Make docker image downloadable in Hydra UI
-rw-r--r--flake.nix15
1 files changed, 12 insertions, 3 deletions
diff --git a/flake.nix b/flake.nix
index 01afc23c3..1b98b526e 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
+ ln -s ${image} $image
+ echo "file binary-dist $image" >> $out/nix-support/hydra-build-products
+ '');
# Line coverage analysis.
coverage =
@@ -516,6 +524,7 @@
binaryTarball = self.hydraJobs.binaryTarball.${system};
perlBindings = self.hydraJobs.perlBindings.${system};
installTests = self.hydraJobs.installTests.${system};
+ dockerImage = self.hydraJobs.dockerImage.${system};
});
packages = forAllSystems (system: {