NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.31k stars 13.54k forks source link

mopidy-with-extensions has a package collision #297539

Open gabysbrain opened 5 months ago

gabysbrain commented 5 months ago

Describe the bug

The mopidy service installs fine by itself but when adding any additional plugins I get a conflict error while installing. I've tried this with a few different plugins and the result is the same. The mopidy service works fine if there are no plugins listed.

Looking at the code this is probably because all extensions were updated to use the top-level fetchPypi but mopidy itself was not. Here's a link to the commit. I'm not sure how to fix this myself.

Steps To Reproduce

Steps to reproduce the behavior:

  1. setup mopidy as a service with extensionPackages:
    {
    services.mopidy = {
    enable = true;
    extensionPackages = [ pkgs.mopidy-tidal pkgs.mopidy-jellyfin ];
    };
    }
  2. run nixos-rebuild switch

Now there should be an error about collision. In my case it's the cffi module.

Expected behavior

Extensions should be installed successfully along with the mopidy service.

Screenshots

Here is the full stack trace:

warning: Git tree '/home/tom/projects/joukamachi.net/music_servers' is dirty
warning: unknown flake output 'deploy'
error: builder for '/nix/store/zcqmsm5cq0h6yllgdxcb9rr6bi1w4nb5-mopidy-with-extensions-3.4.1.drv' failed with exit code 25;
       last 1 log lines:
       > error: collision between `/nix/store/fvnz0idj2f5gpi2m7i16mk9bqndxnc4x-python3.11-cffi-1.16.0/lib/python3.11/site-packages/cffi-1.16.0.dist-info/WHEEL' and `/nix/store/20r15bbdc6zlry6akbi7aqk4byyyi02z-python3.11-cffi-1.16.0-aarch64-unknown-linux-gnu/lib/python3.11/site-packages/cffi-1.16.0.dist-info/WHEEL'
       For full logs, run 'nix log /nix/store/zcqmsm5cq0h6yllgdxcb9rr6bi1w4nb5-mopidy-with-extensions-3.4.1.drv'.
error: 1 dependencies of derivation '/nix/store/jbsaf8yhmvd6a9y7hfmmgm1nlbr0r2x0-unit-mopidy-scan.service.drv' failed to build
error: 1 dependencies of derivation '/nix/store/s9m7aziz8vm8wyzdx7dwz7cqk7grgb9q-system-units.drv' failed to build
error: 1 dependencies of derivation '/nix/store/8q5396s5gqlzflyy7mcgra2rkmlffdp1-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/0mirqxnh9wykrqjs6m9mhxfh7zvwny2i-nixos-system-cherry-23.11.20240314.878ef7d.drv' failed to build
error: 1 dependencies of derivation '/nix/store/7b4g8qyfy1n08i8kyhlrjl64dxsh57fs-activatable-nixos-system-cherry-23.11.20240314.878ef7d.drv' failed to build
error (ignored): error: cannot unlink '/tmp/nix-build-linux-aarch64-unknown-linux-gnu-6.1.81.drv-2/linux-6.1.81/Documentation': Directory not empty
error: 1 dependencies of derivation '/nix/store/bm8biw6m7w4ii4rmsrblh1f5qgq6m333-deploy-rs-check-activate.drv' failed to build
error: build of '/nix/store/bm8biw6m7w4ii4rmsrblh1f5qgq6m333-deploy-rs-check-activate.drv', '/nix/store/dj8nxvf4s5p5ls5svljzbw8zhr072lrb-jsonschema-deploy-system.drv' failed

Notify maintainers

@fpletz is the mopidy maintainer but @wegank did the treewide commit

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

❯ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.81, NixOS, 23.11 (Tapir)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"agenix, home-manager-21.11.tar.gz, nixos-21.11, unstable"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
 - channels(root): `"agenix, home-manager-21.11.tar.gz, nixos-21.11, unstable"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a :+1: reaction to issues you find important.

wegank commented 5 months ago

This has nothing to do with my commit, which has 0 rebuilds (see #233976).

For the error log, I wonder why there are -aarch64-unknown-linux-gnu suffixes on an x86_64-linux system. I'm not a deploy-rs user, but it's possible that there are exotic configurations there that don't work.

gabysbrain commented 5 months ago

I'm cross compiling for a raspberry pi target. But you are right, I just tried setting up mopidy on my local system and it worked fine. I'll have to play around with this tomorrow to see if I can isolate the problem.