diff options
author | Vincent Ambo <mail@tazj.in> | 2022-01-31 10:10:10 +0300 |
---|---|---|
committer | Vincent Ambo <mail@tazj.in> | 2022-01-31 10:10:10 +0300 |
commit | af9f248926b5d641186d64861b5e5c9fa784f18c (patch) | |
tree | 68d9ac33772d7e922ba4266a657acdc6a357eefa /pkgs/build-support/docker | |
parent | 3fc57567860e9d06441ab3b4bb72849b9a4c7aea (diff) | |
download | nixpkgs-af9f248926b5d641186d64861b5e5c9fa784f18c.tar nixpkgs-af9f248926b5d641186d64861b5e5c9fa784f18c.tar.gz nixpkgs-af9f248926b5d641186d64861b5e5c9fa784f18c.tar.bz2 nixpkgs-af9f248926b5d641186d64861b5e5c9fa784f18c.tar.lz nixpkgs-af9f248926b5d641186d64861b5e5c9fa784f18c.tar.xz nixpkgs-af9f248926b5d641186d64861b5e5c9fa784f18c.tar.zst nixpkgs-af9f248926b5d641186d64861b5e5c9fa784f18c.zip |
streamLayeredImage: pass through passthru attributes
This is useful for a use-case we have with a Nix-based CI system that specifies things like deploy steps as passthru attributes[0]. Previously the only way to do this would have been to concatenate attributes onto the resulting derivation, but passing them in and actually treating them as proper passthru attributes is cleaner. [0]: https://cs.tvl.fyi/depot@f7d7da6aceb407b719cf4683a75878fd3aca319e/-/blob/nix/buildkite/default.nix?L222-226
Diffstat (limited to 'pkgs/build-support/docker')
-rw-r--r-- | pkgs/build-support/docker/default.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/build-support/docker/default.nix b/pkgs/build-support/docker/default.nix index 1b6c340f7f0..5718cadd4ff 100644 --- a/pkgs/build-support/docker/default.nix +++ b/pkgs/build-support/docker/default.nix @@ -827,6 +827,8 @@ rec { # this on, but tooling may disable this to insert the store paths more # efficiently via other means, such as bind mounting the host store. includeStorePaths ? true + , # Passthru arguments for the underlying derivation. + passthru ? {} , }: assert @@ -987,7 +989,7 @@ rec { result = runCommand "stream-${baseName}" { inherit (conf) imageName; - passthru = { + passthru = passthru // { inherit (conf) imageTag; # Distinguish tarballs and exes at the Nix level so functions that |