Skip to content

Using entrypoint without defining command causes eval failure (since #98) #110

@robinanterior

Description

@robinanterior

Using this flake:

{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
    systems.url = "systems";
    flake-parts.url = "github:hercules-ci/flake-parts";
    process-compose-flake.url = "github:Platonic-Systems/process-compose-flake";
  };

  outputs = { self, flake-parts, ... }@inputs: flake-parts.lib.mkFlake { inherit inputs; } {
    systems = import inputs.systems;
    imports = [
      inputs.process-compose-flake.flakeModule
      ({ ... }: {
        perSystem = { system, pkgs, ... }: {
          process-compose.foo.settings.processes.hello = {
            entrypoint = [pkgs.stdenv.shell "-c" "${pkgs.hello}/bin/hello; sleep 1000"];
          };
        };
      })
    ];
  };
}

Running it:

$ nix run .#foo
error:
       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:37:12:
           36|
           37|   strict = derivationStrict drvAttrs;
             |            ^
           38|

       … while evaluating derivation 'foo'
         whose name attribute is located at /nix/store/l04691r5xf6gj386nd8qqigdk29is7yd-source/pkgs/stdenv/generic/make-derivation.nix:541:13

       … while evaluating attribute 'text' of derivation 'foo'
         at /nix/store/l04691r5xf6gj386nd8qqigdk29is7yd-source/pkgs/build-support/trivial-builders/default.nix:129:13:
          128|           inherit
          129|             text
             |             ^
          130|             executable

       … while evaluating the option `perSystem.aarch64-darwin.process-compose.foo.outputs.settingsFile':

       … while evaluating definitions from `/nix/store/xn4p4nhddsczgq35nzfv12j00pzxmhig-source/nix/process-compose/settings':

       … while evaluating the option `perSystem.aarch64-darwin.process-compose.foo.settings.processes.hello.command':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: The option `perSystem.aarch64-darwin.process-compose.foo.settings.processes.hello.command' was accessed but has no value defined. Try setting the option.

Expected output: a process-compose process with the "hello" program.

I assume this is related to the work done in #98

EDIT: expected this to work based on the docs for "entrypoint" which say:

     Specifies the process command as a list of arguments. 
     Overridden by the command option if it is present. 

Which suggests the point of entrypoint is to exist without command specified. I will say, it's a bit of a departure from the docker-compose semantics of entrypoint, which is to be combined with the "command", and both command and entrypoint can be defined either as a string or as an array of strings, but afai understand that's a process-compose concern and not a process-compose-flake concern, so it's unrelated to this particular issue. This issue is based purely on the process-compose-flake documentation of the "entrypoint" option. Is that a correct interpretation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions