Commit Graph

39 Commits

Author SHA1 Message Date
Sergei Trofimovich
35ea33f20b wine: restore the eval on linux
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.
2024-10-11 06:58:31 +01:00
Randy Eckenrode
0421ee2dd8
wine64Packages.{stable,unstable,staging}: use the 14.4 SDK
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.
2024-10-10 01:07:36 -04:00
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
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"
```
2024-09-25 00:04:37 +03:00
Sergei Trofimovich
124392093c wine64Packages.wayland: add missing wayland-scanner build input
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.
2024-08-20 06:58:25 +01:00
Rick van Schijndel
43ce0f9ee0
Merge pull request #318256 from risicle/ris-stack-clash-protection
cc-wrapper: add stack clash protection hardening flag
2024-06-19 19:54:30 +02:00
Alexis Hildebrandt
755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00
Robert Scott
0e49cbda2e wine: disable stackclashprotection hardening flag 2024-06-07 20:23:46 +01:00
Randy Eckenrode
f5df1382ab
winePackages.{stable,unstable,staging}: cleanups
- 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.
2024-04-28 22:52:26 -04:00
Sergei Trofimovich
8f3b751ca8 wineWowPackages.minimal: fix build (missing --without-x)
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>
2024-02-24 08:02:22 +00:00
Martino Fontana
b2182b9130 wine: cleanup Wayland
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
2024-02-11 14:39:31 +01:00
Aman Setia
00f48620ac winePackages.*: Enable wayland driver; wine-waylan
..d only add -wayland prefix if wine-wayland package is selected otherwise keep the original name
2024-01-20 21:08:49 +01:00
Randy Eckenrode
bf7ad8cfbf
wine64Packages.minimal: mark broken on Darwin
Darwin requires MinGW to build Wine because clang does not support
`-mabi=ms`, which is required when building without MinGW .
2023-11-18 10:44:39 -05:00
Randy Eckenrode
fc2852466d
wineWow64Packages: fix build on Darwin 2023-11-18 10:30:48 -05:00
Randy Eckenrode
fd2703130c
wine64Packages: 8.17 -> 8.20
https://www.winehq.org/announce/8.18
https://www.winehq.org/announce/8.19
https://www.winehq.org/announce/8.20
2023-11-18 10:30:48 -05:00
Daniel Hill
0ddfdc7c1a wine: sort supportFlags 2023-09-19 19:50:26 +12:00
Daniel Hill
07a24f168d wine: add libXfixes
Upstream recommends using this library.
2023-09-19 19:42:34 +12:00
Daniel Hill
965c429917 wine: Fix missing X11 libraries for Wayland build
The Wayland build provides both Wayland and X11 support

Wine still prioritizes X11 over Wayland by default, without these
support libraries some things don't work, including causing some games
to crash.
2023-09-19 19:42:34 +12:00
Michael Raskin
7c6847bfc9 winePackages: add reckenrode as a maintainer 2023-08-28 00:43:57 +02:00
Randy Eckenrode
bdf47492d4 wine64Packages.unstable: Darwin compatibility fixes
- Wine 8.12 changed the implementation of `macdrv_get_gpus_from_metal`,
  causing the patch used by nixpkgs to break. This patch splits that
  patch up to apply cleanly depending on the version;
- Silence an implicit pointer to integer conversion warning due to the
  above patch (required by the Clang 16 stdenv bump);
- Add the PCSC framework on Darwin, which is required as of Wine 8.14.

Wine 8.14 changes the implementation of `macdrv_get_gpus_from_metal`,
causing the patch to no longer apply cleanly. Splitting the patch allows
only the parts that are still needed to apply cleanly dependin gon the
Wine version being built.
2023-08-27 10:58:27 +02:00
Martino Fontana
6f4de53ca4 wine: minor cleanup 2023-06-21 15:37:03 +02:00
Martino Fontana
72921c1092 wine{Unstable,Staging}: 8.1 -> 8.3 2023-03-13 11:48:45 +01:00
Randy Eckenrode
1d79811a42
wine: fix build failure on Darwin 2023-03-05 21:09:33 -05:00
Stefan Frijters
1e14a900a5
wine: remove vkd3dSupport
From https://www.winehq.org/announce/8.0:

"The vkd3d and LDAP libraries are bundled in the source tree and built as
  PE. The corresponding Unix libraries are no longer needed."
2023-02-03 23:06:35 +01:00
Stefan Frijters
3dbfc39ac5
wine: remove ldapSupport
From https://www.winehq.org/announce/8.0:

"The vkd3d and LDAP libraries are bundled in the source tree and built as
  PE. The corresponding Unix libraries are no longer needed."
2023-02-03 23:06:35 +01:00
Stefan Frijters
55b08c0d56
wine: remove openalSupport
From https://www.winehq.org/announce/8.0:

"The OpenAL library is no longer used."
2023-02-03 23:06:35 +01:00
Ryan Hendrickson
98111739de wine-wayland: restore hyphen to pname 2022-12-14 11:57:13 -05:00
Ryan Hendrickson
729486a667 wine, winetricks: add updateScript 2022-12-12 10:10:46 -05:00
Ryan Hendrickson
98550c8dfa wine-wayland: 7.0-rc2 -> 7.20 2022-11-04 11:41:42 -04:00
Stefan Frijters
d86ccab260
wine: remove unrecognized flag --with-vkd3d
`configure: WARNING: unrecognized options: --with-vkd3d`

Removed upstream in 9d56ca72fe
2022-10-19 00:11:12 +02:00
Shamrock Lee
c2dbbe706b wine64Packages: fix mainProgram 2022-07-22 22:19:21 +00:00
Robert Scott
466c2e342a treewide/applications: add sourceType binaryNativeCode for many packages 2022-06-23 18:38:19 +01:00
Stefan Frijters
30aeecfc6f
wine: enable parallel build again
The issue with dlltool was fixed in 4b0f59afcc.
2022-05-22 13:31:16 +02:00
Stefan Frijters
74e705c3df
wine: Disable parallel building until dlltool is fixed 2022-05-13 12:57:15 +02:00
Felix Buehler
e0476d93fe treewide: rename name to pname&version 2022-03-23 22:34:54 +01:00
Randy Eckenrode
ff2aca9f4a
wine: enable Vulkan on Darwin 2022-02-18 15:20:34 -05:00
Randy Eckenrode
424e97118f
wine: improve Darwin support
- Add a setup hook to allow Darwin to build PE DLLs using MinGW;
- Add a postConfigure script to fix preloader brekage on Apple Silicon
  Macs running under Rosetta 2;
- Disable linking against X11 libraries (pulled in by ffmpeg); and
- Allow building Wine 7.0 using the 10.12 SDK on x86_64-darwin.
2022-02-17 08:30:42 -05:00
Randy Eckenrode
bf1f71c0e2
wine: support stack unwinding 2022-02-17 08:30:42 -05:00
Randy Eckenrode
855311e176
wine-packages: support libusb and libkrb5 2022-02-17 08:30:42 -05:00
AndersonTorres
8d65e832f0 Move misc/emulators to applications/emulators - part 1
Emulators form a class by themselves. So, they should be moved to applications/.
2022-02-16 01:38:20 -03:00