Platonic-Systems / Platonic-Systems/process-compose-flake

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

Open
#110 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Nix
Stars
205
Forks
30
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the supplied process-compose.foo.settings.processes.hello flake and the documented entrypoint option; compare its behavior with the work referenced in #98. Run nix run .#foo and confirm the flake evaluates successfully to a process-compose process running hello without a command option.

Written by the indexing model from the issue text.

Assessment

Domain
devops, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.