Wine fails to build due to missing wineRelease argument
Closed this issue · 8 comments
With commit NixOS/nixpkgs@00f4862, wine now expects a wineRelease argument to select the version (from a quick glance, it's to select between wine-wayland and wine-staging, however wayland is built by default on Linux). However, current wine packages here do not supply the wineRelease argument, making the build fail:
error: evaluation aborted with the following error message: 'lib.customisation.callPackageWith: Function called without required argument "wineRelease" at /nix/store/43d9van77slsqjbxak4di29f5w6j7j0m-source/pkgs/applications/emulators/wine/base.nix:6'
Are you overriding the Nixpkgs input? CI doesn't report any failure for wines.
at /nix/store/43d9van77slsqjbxak4di29f5w6j7j0m-source/pkgs/applications/emulators/wine/base.nix:6'
I'm inclined to believe that the issue is from nixpkgs, not nix-gaming
I don't have any overrides regarding wine or anything, my overlay only adds three local packages.
The bug is very new and got introduced into nixos-unstable with the latest batch of changes, it won't trigger against stable because the argument is not required by wine in stable. If the CI doesn't build against unstable, it won't get triggered until possibly the next release, or if the commit gets merged into stable.
I'm inclined to believe that the issue is from nixpkgs, not nix-gaming
It is, but this is an intended change. Nixpkgs has already adapted the other files (e.g. all-packages.nix) to supply wine with the new argument.
Then CI didn't update the nixpkgs input yet (we use nixos-unstable). I'll see if I have time to get around to it.
I'm fine with waiting until CI fails (if it does and the error is not actually something on my side).
Just in case, my system config is at https://git.sr.ht/~incrediblelaser/nix-powerbox-config so you can check for anything that might not be correct. It's using flakes and nixpkgs configuration should happen through flake.nix -> config/configuration.nix -> config/programs.nix and a quick nix repl gives [ «lambda @ /nix/store/x75299ydczf8hhzg6zy0s17zzf9638q9-source/config/programs.nix:187:25» ] which tracks
The CI builds against unstable.
Though I've tested with latest commit, and no errors popped up.
had to change em like that and it worked
wine-ge =
(callPackage "${nixpkgs-wine}/pkgs/applications/emulators/wine/base.nix" (defaults
// {
pname = pnameGen "wine-ge";
version = pins.proton-wine.branch;
src = pins.proton-wine;
wineRelease = "ge";
}))
.overrideAttrs (old: {
meta = old.meta // {passthru.updateScript = ./update-wine-ge.sh;};
});
wine-tkg = callPackage "${nixpkgs-wine}/pkgs/applications/emulators/wine/base.nix" (lib.recursiveUpdate defaults
rec {
pname = pnameGen "wine-tkg";
version = lib.removeSuffix "\n" (lib.removePrefix "Wine version " (builtins.readFile "${src}/VERSION"));
src = pins.wine-tkg;
wineRelease = "wayland";
supportFlags.waylandSupport = true;
});
wine-osu = let
pname = pnameGen "wine-osu";
version = "7.0";
staging = fetchFromGitHub {
owner = "wine-staging";
repo = "wine-staging";
rev = "v${version}";
sha256 = "sha256-2gBfsutKG0ok2ISnnAUhJit7H2TLPDpuP5gvfMVE44o=";
};
in
(callPackage "${nixpkgs-wine}/pkgs/applications/emulators/wine/base.nix" (defaults
// rec {
inherit version pname;
src = fetchFromGitHub {
owner = "wine-mirror";
repo = "wine";
wineRelease = "osu";
rev = "wine-${version}";
sha256 = "sha256-uDdjgibNGe8m1EEL7LGIkuFd1UUAFM21OgJpbfiVPJs=";
};
patches = ["${nixpkgs-wine}/pkgs/applications/emulators/wine/cert-path.patch"] ++ self.lib.mkPatches ./patches;
}))
because wineRelease has no default value in https://github.com/NixOS/nixpkgs/blob/e945a38476b3b0402164fb0bbbc287d95d4ff246/pkgs/applications/emulators/wine/base.nix#L6
it should cause a CI error now if you update the locks
ci is still at 4fddc9be4eaf195d631333908f2a454b03628ee5 which doesnt yet have that commit in
see: https://github.com/NixOS/nixpkgs/blob/4fddc9be4eaf195d631333908f2a454b03628ee5/pkgs/applications/emulators/wine/base.nix
Thanks for the comments, I've fixed it.