nix-community/dream2nix

pdm: not supporting editable dependencies

Opened this issue · 1 comments

yajo commented

When your project has editable dev dependencies, you can't build it with d2n:

pdm init # respond
pdm add --dev -e ./sub-dep
nix build .#my-package.config.groups.dev.sub-dep.1 # asuming you already set up correctly pdm backend on d2n flake

error:
       … while evaluating the attribute 'value'

         at /nix/store/m5i890m2g4pnyflpn48d1dpzzmwp5q4p-source/lib/modules.nix:809:9:

          808|     in warnDeprecation opt //
          809|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          810|         inherit (res.defsFinal') highestPrio;

       … while calling the 'addErrorContext' builtin

         at /nix/store/m5i890m2g4pnyflpn48d1dpzzmwp5q4p-source/lib/modules.nix:809:17:

          808|     in warnDeprecation opt //
          809|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |                 ^
          810|         inherit (res.defsFinal') highestPrio;

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

       error: attribute 'files' missing

       at /nix/store/bqxm2fdm454rbx21zryqc2idnivaq5hp-source/modules/dream2nix/WIP-python-pdm/lib.nix:177:30:

          176|   parsePackage = environ: item: let
          177|     sources = sourcesToAttrs item.files;
             |                              ^
          178|     compatibleSources =
«derivation 

@moduon MT-1075

Have you tried manually refreshing the lock file(with pdm lock --refresh and not nix run .#default.lock) after adding the dev dependency? It might be an instance of this: #999