NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.06k stars 14.11k forks source link

Build failure: fooyin #346953

Open imoBooze opened 1 month ago

imoBooze commented 1 month ago

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install fooyin after bf2f2c6.

Build log

`error: Package ‘libvgm-0-unstable-2024-06-08’ in /nix/store/sdzpqjwx7pdx6lsq6llyfqqf7hspp83c-source/pkgs/development/libraries/libvgm/default.nix:113 has an unfree license (‘unfree’), refusing to evaluate.`

Additional context

Version 0.7.0 builds fine. The requirement of libvgm in version 0.7.2 causes the build to fail as I have unfree packages disabled. Is there any way around this other than enabling unfree packages? Fooyin itself is under the GPL-3.0 license.

Notify maintainers

@peterhoeg

Metadata

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

 - system: `"x86_64-linux"`
 - host os: `Linux 6.10.9-zen1, NixOS, 24.11 (Vicuna), 24.11.20241001.27e30d1`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.8`
 - nixpkgs: `/nix/store/lryfc8mhk1czqsa421di2y5nzz5c3b8m-source`

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

jackwilsdon commented 1 month ago

If you don't mind losing WonderSwan support (which is what has the unfree license), you can do this:

pkgs.fooyin.override {
  libvgm = pkgs.libvgm.override {
    # All emulators except WSWAN_ALL.
    emulators = [
      "32X_PWM_ALL"
      "AY8910_ALL"
      "C140_ALL"
      "C219_ALL"
      "C352_ALL"
      "C6280_ALL"
      "ES5503_ALL"
      "ES5506_ALL"
      "GA20_ALL"
      "GAMEBOY_ALL"
      "K051649_ALL"
      "K053260_ALL"
      "K054539_ALL"
      "MIKEY_ALL"
      "NESAPU_ALL"
      "OKIM6258_ALL"
      "OKIM6295_ALL"
      "POKEY_ALL"
      "QSOUND_ALL"
      "RF5C68_ALL"
      "SAA1099_ALL"
      "SCSP_ALL"
      "SEGAPCM_ALL"
      "SN76496_ALL"
      "UPD7759_ALL"
      "VBOY_VSU_ALL"
      "X1_010_ALL"
      "Y8950_ALL"
      "YM2151_ALL"
      "YM2203_ALL"
      "YM2413_ALL"
      "YM2608_ALL"
      "YM2610_ALL"
      "YM2612_ALL"
      "YM3526_ALL"
      "YM3812_ALL"
      "YMF262_ALL"
      "YMF271_ALL"
      "YMF278B_ALL"
      "YMW258_ALL"
      "YMZ280B_ALL"
    ];
    withAllEmulators = false;
  };
}

Having to list all of the emulators isn't ideal (list is from https://github.com/ValleyBell/libvgm/blob/34c368cde98f33c42455fbbfbec07073ba79bf5c/emu/CMakeLists.txt#L98-L142), but it seems to be the only way to exclude an emulator.

If you're not using any emulated formats at all, you can just disable emulation entirely:

pkgs.fooyin.override {
  libvgm = pkgs.libvgm.override {
    enableEmulation = false;
    enableLibplayer = false; # Depends on emulation.
  };
}

This seems to cause fooyin to not find libvgm at all (the Flatpak version doesn't seem to have libvgm anyway).