@@ -442,6 +442,7 @@ rec {
442442 in
443443 runCommand "${name}.tar.gz" {
444444 inherit (stream) imageName;
445+ passthru = { inherit (stream) imageTag; };
445446 buildInputs = [ pigz ];
446447 } "${stream} | pigz -nT > $out";
447448
@@ -517,6 +518,11 @@ rec {
517518 layerClosure = writeReferencesToFile layer;
518519 passthru.buildArgs = args;
519520 passthru.layer = layer;
521+ passthru.imageTag =
522+ if tag != null
523+ then lib.toLower tag
524+ else
525+ lib.head (lib.strings.splitString "-" (baseNameOf result.outPath));
520526 # Docker can't be made to run darwin binaries
521527 meta.badPlatforms = lib.platforms.darwin;
522528 } ''
@@ -737,6 +743,11 @@ rec {
737743 conf = runCommand "${name}-conf.json" {
738744 inherit maxLayers created;
739745 imageName = lib.toLower name;
746+ passthru.imageTag =
747+ if tag != null
748+ then tag
749+ else
750+ lib.head (lib.strings.splitString "-" (baseNameOf conf.outPath));
740751 paths = referencesByPopularity overallClosure;
741752 buildInputs = [ jq ];
742753 } ''
@@ -792,6 +803,7 @@ rec {
792803 '';
793804 result = runCommand "stream-${name}" {
794805 inherit (conf) imageName;
806+ passthru = { inherit (conf) imageTag; };
795807 buildInputs = [ makeWrapper ];
796808 } ''
797809 makeWrapper ${streamScript} $out --add-flags ${conf}