Skip to content

Error: cannot coerce a set to a string #21

@pcboy

Description

@pcboy

I'm trying to run nix run nixpkgs#nixci on my flake, but I'm encountering this error from devour-flake.

🍏 .
🐚 nix --extra-experimental-features 'nix-command flakes' eval '.#nixci.default' --json️
🍎 default.<root>
🐚 nix --extra-experimental-features 'nix-command flakes' flake lock --no-update-lock-file .️
🐚 nix --extra-experimental-features 'nix-command flakes' build '/nix/store/p8vfkmfh43yy8lmz1r65dr9yq3ql7cd7-source#default' -L --no-link --print-out-paths --override-input flake . --refresh -j auto️
error:
       … while calling the 'derivationStrict' builtin

         at /derivation-internal.nix:9:12:

            8|
            9|   strict = derivationStrict drvAttrs;
             |            ^
           10|

       … while evaluating derivation 'devour-output'
         whose name attribute is located at /nix/store/qjqzr7905xxv3rv70z7mkpp06lalnzzb-source/pkgs/stdenv/generic/make-derivation.nix:300:7

       … while evaluating attribute 'text' of derivation 'devour-output'

         at /nix/store/qjqzr7905xxv3rv70z7mkpp06lalnzzb-source/pkgs/build-support/trivial-builders/default.nix:148:16:

          147|     runCommand name
          148|       { inherit text executable checkPhase allowSubstitutes preferLocalBuild;
             |                ^
          149|         passAsFile = [ "text" ];

       error: cannot coerce a set to a string
Error: devour-flake failed to run (exited: 1)

It seems it's happening because one of my outputs is actually of the form:

      packages.pythonPkgs = {
        package1 = pkgs.callPackage ./packages/mypackage1/. {};
        package2 = pkgs.callPackage ./packages/mypackage2/. {};
      };

Is there a way to make that structure work with nixci/devour-output? I'm would like to clearly separate python packages in a pythonPkgs key. Is my way of handling this non standard maybe? 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions