Without the change the instantiation in `linux` fails as:
$ nix-instantiate -A wine
error:
… while calling the 'derivationStrict' builtin
at <nix/derivation-internal.nix>:34:12:
33|
34| strict = derivationStrict drvAttrs;
| ^
35|
… while evaluating derivation 'wine-9.0'
whose name attribute is located at /tmp/z/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:336:7
… while evaluating attribute 'NIX_LDFLAGS' of derivation 'wine-9.0'
at /tmp/z/nixpkgs/pkgs/applications/emulators/wine/base.nix:121:3:
120| # LD_LIBRARY_PATH.
121| NIX_LDFLAGS = toString (map (path: "-rpath " + path) (
| ^
122| map (x: "${lib.getLib x}/lib") ([ stdenv.cc.cc ]
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: Package ‘apple-sdk-14.4’ in /tmp/z/nixpkgs/pkgs/by-name/ap/apple-sdk/package.nix:111 is not available on the requested hostPlatform:
hostPlatform.config = "i686-unknown-linux-gnu"
package.meta.platforms = [
"x86_64-darwin"
"i686-darwin"
"aarch64-darwin"
"armv7a-darwin"
]
package.meta.badPlatforms = [
{
cpu = {
bits = 32;
};
}
]
, refusing to evaluate.
a) To temporarily allow packages that are unsupported for this system, you can use an environment variable
for a single invocation of the nix tools.
$ export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1
Note: When using `nix shell`, `nix build`, `nix develop`, etc with a flake,
then pass `--impure` in order to allow use of environment variables.
b) For `nixos-rebuild` you can set
{ nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.
c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
{ allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.
Wine supports a form of futexes on Darwin when built with the 14.4 SDK
and running on 14.4 or later. It will fall back automatically to other
primitives when running on older systems.
In preparation for the deprecation of `stdenv.isX`.
These shorthands are not conducive to cross-compilation because they
hide the platforms.
Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way
One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059
There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.
```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
Without the change the build fails on `staging` as:
wine64-wayland> checking for wayland-scanner... Package wayland-scanner was not found in the pkg-config search path.
wine64-wayland> Perhaps you should add the directory containing `wayland-scanner.pc'
wine64-wayland> to the PKG_CONFIG_PATH environment variable
wine64-wayland> No package 'wayland-scanner' found
wine64-wayland> no
...
wine64-wayland> configure: error: Wayland 64-bit development files not found or not new enough, the Wayland driver won't be supported.
wine64-wayland> This is an error since --with-wayland was requested.
The gitapply.sh script from wine-staging tries to use 'git apply' first.
If git is not present, it will fall back to using the patch command.
As of wine 9.13, at least one of the patches doesn't apply correctly with
'patch', but it works with git. Adding gitMinimal to nativeBuildInputs
fixes the build errors.
- Make util-linux conditional in wine-staging due to `uuid.h` conflicts;
- Remove `lib.overrideDerivation`, allowing wine-staging overrides;
- Use `overrideSDK` to build with the 11.0 SDK with a 10.7 deployment
target, matching the deployment target of the unofficial Mac packages;
- Drop all Darwin-related patches. They’re not needed with the 11.0 SDK;
- Switch to conditionally using `badPlatforms` instead of using a mix of
`broken` and filtering Darwin from `meta.platforms`; and
- Remove unnecessary rpath references to Darwin frameworks.
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
Without the change build fails on `master` as
https://hydra.nixos.org/build/249529907:
checking for X... no
configure: error: X 64-bit development files not found. Wine will be built
without X support, which probably isn't what you want. You will need
to install 64-bit development packages of Xlib at the very least.
Use the --without-x option if you really want this.
The change explicitly passes `--without-x` for `wine` without
`x11Support`.
Co-authored-by: MinerSebas <66798382+MinerSebas@users.noreply.github.com>
Makes base.nix less Wayland-centric. This means:
- Don't specify support in the meta.description (since even regular Wine supports it, it's specified everywhere)
- `x11Support` and `waylandSupport` are now set in `wine-packages.nix`, like every other flag (they are also now disabled on minimal)
- Disable Darwin in supported platforms if an incompatible supportFlag is true (not just `waylandSupport`)
- Add wineRelease name for every release other than "stable" or "unstable", instead of just "wayland"
- This also fixes an inconsistency on wine-staging, where "-staging" was written after the version