dockerTools.buildLayeredImage: fix configureFlags syntax in nixosTests

The string added to `configureFlags` for building `hello`
for nixosTests example
«layered image with files owned by a user other than root»
had a leading space, leading to error

	configure flags: --disable-dependency-tracking --prefix=/nix/store/kwdkh22lfr3irggg076jpydbk1556iax-hello-2.12.3 \ --program-prefix=layeredImageWithFakeRootCommands-
	configure: error: invalid variable name: ' --program-prefix'

when running `./configure` for that custom `hello`, making
`nixosTests.allDrivers.docker-tools` fail.
This commit is contained in:
Raphael Borun Das Gupta
2026-05-16 13:50:14 +02:00
parent 8c4ba88c8e
commit cc6290d072

View File

@@ -704,7 +704,7 @@ rec {
finalAttrs: prevAttrs: {
# A unique `hello` to make sure that it isn't included via another mechanism by accident.
configureFlags = prevAttrs.configureFlags or [ ] ++ [
" --program-prefix=layeredImageWithFakeRootCommands-"
"--program-prefix=layeredImageWithFakeRootCommands-"
];
doCheck = false;
versionCheckProgram = "${placeholder "out"}/bin/${finalAttrs.meta.mainProgram}";