From b2f19980dbe86e2c8e19877035e8a1753636a72c Mon Sep 17 00:00:00 2001 From: WxNzEMof <143541718+WxNzEMof@users.noreply.github.com> Date: Mon, 26 Feb 2024 18:41:33 +0000 Subject: [PATCH] Remove the redundant comments from streamLayeredImage parameters The proper place to describe them is the documentation, where they are described thoroughly. --- pkgs/build-support/docker/default.nix | 48 ++++++++------------------- 1 file changed, 14 insertions(+), 34 deletions(-) diff --git a/pkgs/build-support/docker/default.nix b/pkgs/build-support/docker/default.nix index 5a57a3f80c7c..1fe0ef18aa99 100644 --- a/pkgs/build-support/docker/default.nix +++ b/pkgs/build-support/docker/default.nix @@ -890,46 +890,26 @@ rec { }) ); + # Arguments are documented in ../../../doc/build-helpers/images/dockertools.section.md streamLayeredImage = lib.makeOverridable ( { - # Image Name name - , # Image tag, the Nix's output hash will be used if null - tag ? null - , # Parent image, to append to. - fromImage ? null - , # Files to put on the image (a nix store path or list of paths). - contents ? [ ] - , # Docker config; e.g. what command to run on the container. - config ? { } - , # Image architecture, defaults to the architecture of the `hostPlatform` when unset - architecture ? defaultArchitecture - , # Time of creation of the image. Passing "now" will make the - # created date be the time of building. - created ? "1970-01-01T00:00:01Z" - , # Credentials for file ownership. - uid ? 0 + , tag ? null + , fromImage ? null + , contents ? [ ] + , config ? { } + , architecture ? defaultArchitecture + , created ? "1970-01-01T00:00:01Z" + , uid ? 0 , gid ? 0 , uname ? "root" , gname ? "root" - , # Optional bash script to run on the files prior to fixturizing the layer. - extraCommands ? "" - , # Optional bash script to run inside fakeroot environment. - # Could be used for changing ownership of files in customisation layer. - fakeRootCommands ? "" - , # Whether to run fakeRootCommands in fakechroot as well, so that they - # appear to run inside the image, but have access to the normal Nix store. - # Perhaps this could be enabled on by default on pkgs.stdenv.buildPlatform.isLinux - enableFakechroot ? false - , # We pick 100 to ensure there is plenty of room for extension. I - # believe the actual maximum is 128. - maxLayers ? 100 - , # Whether to include store paths in the image. You generally want to leave - # 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 ? {} + , maxLayers ? 100 + , extraCommands ? "" + , fakeRootCommands ? "" + , enableFakechroot ? false + , includeStorePaths ? true + , passthru ? {} , }: assert