Skip to content

Git dependencies with pdm fail with error: attribute 'files' missing #1083

@rupurt

Description

@rupurt

When using the pdm module with git dependencies in pyproject.toml building the derivations fails.

# pyproject.toml
dependencies = [
    # "aioftp >=0.22.0",
    # patched version of aioftp to support custom subcommands
    "aioftp @ git+https://github.com/rupurt/aioftp.git@server-can-add-custom-commands-mapping",
]
error:
       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:34:12:
           33|
           34|   strict = derivationStrict drvAttrs;
             |            ^
           35|

       … while evaluating derivation 'nix-shell'
         whose name attribute is located at /nix/store/7z8msq6a39p88nnfzagpzbykahiz1hrq-source/pkgs/stdenv/generic/make-derivation.nix:336:7while evaluating attribute 'buildInputs' of derivation 'nix-shell'
         at /nix/store/7z8msq6a39p88nnfzagpzbykahiz1hrq-source/pkgs/stdenv/generic/make-derivation.nix:383:7:
          382|       depsHostHost                = elemAt (elemAt dependencies 1) 0;
          383|       buildInputs                 = elemAt (elemAt dependencies 1) 1;
             |       ^
          384|       depsTargetTarget            = elemAt (elemAt dependencies 2) 0;while evaluating the option `groups.default.packages.aioftp."0.24.1".evaluated.public.outPath':

       … while evaluating definitions from `/nix/store/d858pcyym8hif6wbjqqpjdffgavi43qy-source/modules/dream2nix/package-func':

       … while evaluating the option `groups.default.packages.aioftp."0.24.1".evaluated.package-func.result':

       … while evaluating definitions from `/nix/store/d858pcyym8hif6wbjqqpjdffgavi43qy-source/modules/dream2nix/package-func':

       … while evaluating the option `groups.default.packages.aioftp."0.24.1".evaluated.package-func.args':

       … while evaluating definitions from `/nix/store/d858pcyym8hif6wbjqqpjdffgavi43qy-source/modules/dream2nix/mkDerivation':

       … while evaluating the option `groups.default.packages.aioftp."0.24.1".evaluated.mkDerivation.buildInputs':

       … while evaluating definitions from `/nix/store/d858pcyym8hif6wbjqqpjdffgavi43qy-source/modules/dream2nix/WIP-python-pdm, via option overrideType':

       … while evaluating the option `groups.default.packages.aioftp."0.24.1".evaluated.mkDerivation.src':

       … while evaluating definitions from `/nix/store/d858pcyym8hif6wbjqqpjdffgavi43qy-source/modules/dream2nix/WIP-python-pdm, via option groups.default.packages.aioftp."0.24.1".module':

       … while evaluating definitions from `/nix/store/d858pcyym8hif6wbjqqpjdffgavi43qy-source/modules/dream2nix/WIP-python-pdm':

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

       error: attribute 'files' missing
       at /nix/store/d858pcyym8hif6wbjqqpjdffgavi43qy-source/modules/dream2nix/WIP-python-pdm/lib.nix:177:30:
          176|   parsePackage = environ: item: let
          177|     sources = sourcesToAttrs item.files;
             |                              ^
          178|     compatibleSources =

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