NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.29k stars 14.27k forks source link

Collision between flutter's and xmlformat's LICENSE file #254265

Open gepbird opened 1 year ago

gepbird commented 1 year ago

Describe the bug

When installing both xmlformat and flutter, I get a warning about a colliding LICENSE file.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Add flutter and xmlformat to the packages
  2. Rebuild the system
  3. Watch it throw a warning about a colliding LICENSE file

Expected behavior

No warnings/errors

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Error line:

error: collision between `/nix/store/9gvw46bp813wg24ydl85swia0l6f6llj-xmlformat-1.04/LICENSE' and `/nix/store/kynlkmw6w70l7i1m6wxrrqzjsxm9jha7-flutter-wrapped-sdk-links/LICENSE'

Notify maintainers

xmlformat: @grahamc flutter: @gilice @lukegb

Metadata

~ ❯ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.49, NixOS, 23.11 (Tapir), 23.11pre522946.0bffda19b8af`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.17.0`
 - channels(root): `"nixos-unstable"`
 - nixpkgs: `/home/gep/.nix-defexpr/channels/nixpkgs`
gilice commented 1 year ago

I cannot reproduce with this:

# flake.nix
{
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
  outputs = { self, nixpkgs }: {
    nixosConfigurations.config = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
        {
          # needed to satisfy assertions
          imports = [ /etc/nixos/hardware-configuration.nix ];
          boot.loader.grub.devices = [ "/again/just/so/it/doesnt/error/out" ];
          environment.systemPackages =
            with nixpkgs.legacyPackages."x86_64-linux"; [ xmlformat flutter ];
        }
      ];
    };
  };
}

nixos-rebuild build --flake ./flake.nix#config --impure -v

Please post the relevant part of your config.

gepbird commented 1 year ago

@gilice Looks like this bug only occurs when these packages are defined with home-manager:

home-manager.users.myuser.home.packages = with pkgs;  [
  flutter
  xmlformat
];
gilice commented 1 year ago

Can replicate now. Home-Manager throws an error instead of a warning on collisions. Also happens with flutter dart.

gilice commented 1 year ago

So now there is two questions:

gilice commented 1 year ago

Small progress update:

gepbird commented 1 year ago

There are (at least) 14 other packages suffering from this type of issue:

I'm not planning to fix any of these, since I'd rather not break packages I don't use, anyone feel free to contribute :)

felschr commented 9 months ago

yubioath-flutter is also affected.

I-Want-ToBelieve commented 5 months ago

rustdesk-flutter is also affected.

I-Want-ToBelieve commented 5 months ago

localsend is also affected.