build-support/docker: remove throwIf usage

This commit is contained in:
Eman Resu
2026-05-26 14:22:40 -04:00
parent 9442881b7b
commit f5c31ce008
+6 -3
View File
@@ -655,9 +655,12 @@ rec {
checked =
lib.warnIf (contents != null)
"in docker image ${name}: The contents parameter is deprecated. Change to copyToRoot if the contents are designed to be copied to the root filesystem, such as when you use `buildEnv` or similar between contents and your packages. Use copyToRoot = buildEnv { ... }; or similar if you intend to add packages to /bin."
lib.throwIf
(contents != null && copyToRoot != null)
"in docker image ${name}: You can not specify both contents and copyToRoot.";
(
if (contents != null && copyToRoot != null) then
throw "in docker image ${name}: You can not specify both contents and copyToRoot."
else
x: x
);
rootContents = if copyToRoot == null then contents else copyToRoot;