Skip to content

Cannot build image from docker.nix following documentation #13443

@gmarti

Description

@gmarti

Describe the bug

Cannot build image from docker.nix

Steps To Reproduce

Run the command from the documentation on nix master

nix build --file docker.nix \                                                
                       --arg uid 1000 \
                       --arg gid 1000 \
                       --argstr uname user \
                       --argstr gname user \
                       --argstr name nix-user \
                       --out-link nix-user.tar.gz
error: cannot evaluate a function that has an argument without a value ('pkgs')
       Nix attempted to evaluate a function as a top level expression; in
       this case it must have its arguments supplied either by default
       values, or passed explicitly with '--arg' or '--argstr'. See
       https://nixos.org/manual/nix/stable/language/constructs.html#functions.
       at /home/gmarti/dev/nix/docker.nix:3:3:
            2|   # Core dependencies
            3|   pkgs,
             |   ^
            4|   lib,

Expected behavior

Following the documentation, i should be able to build docker.nix

Metadata

git cloned nix master at 485cbfc

Additional context

Might be because of : #13354

Checklist


Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions