Merge pull request #212645 from SFrijters/wine-8

wine: 7.x -> 8.x
This commit is contained in:
7c6f434c 2023-02-04 08:14:44 +00:00 committed by GitHub
commit bdd2941140
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 72 additions and 86 deletions

View File

@ -1,5 +1,16 @@
{ lib, stdenv, multiStdenv, cmake, fetchFromGitHub, file, libX11, makeWrapper
, qt5, requireFile, unzip, wine
{ lib,
stdenv,
multiStdenv,
fetchFromGitHub,
requireFile,
unzip,
wine,
cmake,
makeWrapper,
wrapQtAppsHook,
file,
libX11,
qt5
}:
let
@ -13,11 +24,11 @@ let
};
vst-sdk = stdenv.mkDerivation rec {
name = "vstsdk368_08_11_2017_build_121";
name = "vstsdk369_01_03_2018_build_132";
src = requireFile {
name = "${name}.zip";
url = "http://www.steinberg.net/en/company/developers.html";
sha256 = "e0f235d8826d70f1ae0ae5929cd198acae1ecff74612fde5c60cbfb45c2f4a70";
sha256 = "0r29fv6yhm2m5yznn8m4my7fq01w1lpphax4sshagy6b1dgjlv3w";
};
nativeBuildInputs = [ unzip ];
installPhase = "cp -r . $out";
@ -42,9 +53,18 @@ multiStdenv.mkDerivation {
src = airwave-src;
nativeBuildInputs = [ cmake makeWrapper ];
nativeBuildInputs = [
cmake
makeWrapper
wrapQtAppsHook
];
buildInputs = [ file libX11 qt5.qtbase wine-xembed ];
buildInputs = [
file
libX11
qt5.qtbase
wine-xembed
];
postPatch = ''
# Binaries not used directly should land in libexec/.

View File

@ -4,7 +4,6 @@
autoconf, hexdump, perl, nixosTests,
supportFlags,
patches,
vkd3dArches,
moltenvk,
buildScript ? null, configureFlags ? [], mainProgram ? "wine"
}:
@ -71,7 +70,6 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) {
++ lib.optional cupsSupport pkgs.cups
++ lib.optional gettextSupport pkgs.gettext
++ lib.optional dbusSupport pkgs.dbus
++ lib.optional openalSupport pkgs.openal
++ lib.optional cairoSupport pkgs.cairo
++ lib.optional odbcSupport pkgs.unixODBC
++ lib.optional netapiSupport pkgs.samba4
@ -82,7 +80,6 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) {
++ lib.optional saneSupport pkgs.sane-backends
++ lib.optional gphoto2Support pkgs.libgphoto2
++ lib.optional krb5Support pkgs.libkrb5
++ lib.optional ldapSupport pkgs.openldap
++ lib.optional fontconfigSupport pkgs.fontconfig
++ lib.optional alsaSupport pkgs.alsa-lib
++ lib.optional pulseaudioSupport pkgs.libpulseaudio
@ -91,7 +88,6 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) {
++ lib.optional vulkanSupport (if stdenv.isDarwin then moltenvk else pkgs.vulkan-loader)
++ lib.optional sdlSupport pkgs.SDL2
++ lib.optional usbSupport pkgs.libusb1
++ vkd3dArches
++ lib.optionals gstreamerSupport (with pkgs.gst_all_1;
[ gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly gst-libav
(gst-plugins-bad.override { enableZbar = false; }) ])
@ -101,7 +97,7 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) {
++ lib.optionals (openglSupport && !stdenv.isDarwin) [ pkgs.libGLU pkgs.libGL pkgs.mesa.osmesa pkgs.libdrm ]
++ lib.optionals stdenv.isDarwin (with pkgs.buildPackages.darwin.apple_sdk.frameworks; [
CoreServices Foundation ForceFeedback AppKit OpenGL IOKit DiskArbitration Security
ApplicationServices AudioToolbox CoreAudio AudioUnit CoreMIDI OpenAL OpenCL Cocoa Carbon
ApplicationServices AudioToolbox CoreAudio AudioUnit CoreMIDI OpenCL Cocoa Carbon
])
++ lib.optionals (stdenv.isLinux && !waylandSupport) (with pkgs.xorg; [
libX11 libXi libXcursor libXrandr libXrender libXxf86vm libXcomposite libXext

View File

@ -18,7 +18,6 @@
gstreamerSupport ? false,
cupsSupport ? false,
dbusSupport ? false,
openalSupport ? false,
openclSupport ? false,
cairoSupport ? false,
odbcSupport ? false,
@ -30,13 +29,11 @@
saneSupport ? false,
gphoto2Support ? false,
krb5Support ? false,
ldapSupport ? false,
pulseaudioSupport ? false,
udevSupport ? false,
xineramaSupport ? false,
vulkanSupport ? false,
sdlSupport ? false,
vkd3dSupport ? false,
usbSupport ? false,
mingwSupport ? wineRelease != "stable",
waylandSupport ? wineRelease == "wayland",
@ -49,12 +46,12 @@ let wine-build = build: release:
wineRelease = release;
supportFlags = {
inherit
cupsSupport gettextSupport dbusSupport openalSupport cairoSupport
cupsSupport gettextSupport dbusSupport cairoSupport
odbcSupport netapiSupport cursesSupport vaSupport pcapSupport
v4lSupport saneSupport gphoto2Support krb5Support ldapSupport fontconfigSupport
v4lSupport saneSupport gphoto2Support krb5Support fontconfigSupport
alsaSupport pulseaudioSupport xineramaSupport gtkSupport openclSupport
tlsSupport openglSupport gstreamerSupport udevSupport vulkanSupport
sdlSupport usbSupport vkd3dSupport mingwSupport waylandSupport embedInstallers;
sdlSupport usbSupport mingwSupport waylandSupport embedInstallers;
};
inherit moltenvk;
});

View File

@ -5,14 +5,11 @@
let
src = lib.getAttr wineRelease (callPackage ./sources.nix {});
vkd3d = pkgs.callPackage ./vkd3d.nix { inherit moltenvk; };
vkd3d_i686 = pkgsi686Linux.callPackage ./vkd3d.nix { inherit moltenvk; };
in with src; {
wine32 = pkgsi686Linux.callPackage ./base.nix {
pname = "wine";
inherit src version supportFlags patches moltenvk;
pkgArches = [ pkgsi686Linux ];
vkd3dArches = lib.optionals supportFlags.vkd3dSupport [ vkd3d_i686 ];
geckos = [ gecko32 ];
mingwGccs = with pkgsCross; [ mingw32.buildPackages.gcc ];
monos = [ mono ];
@ -22,7 +19,6 @@ in with src; {
pname = "wine64";
inherit src version supportFlags patches moltenvk;
pkgArches = [ pkgs ];
vkd3dArches = lib.optionals supportFlags.vkd3dSupport [ vkd3d ];
mingwGccs = with pkgsCross; [ mingwW64.buildPackages.gcc ];
geckos = [ gecko64 ];
monos = [ mono ];
@ -35,7 +31,6 @@ in with src; {
inherit src version supportFlags patches moltenvk;
stdenv = stdenv_32bit;
pkgArches = [ pkgs pkgsi686Linux ];
vkd3dArches = lib.optionals supportFlags.vkd3dSupport [ vkd3d vkd3d_i686 ];
geckos = [ gecko32 gecko64 ];
mingwGccs = with pkgsCross; [ mingw32.buildPackages.gcc mingwW64.buildPackages.gcc ];
monos = [ mono ];

View File

@ -1,17 +1,17 @@
{ pkgs ? import <nixpkgs> {} }:
## we default to importing <nixpkgs> here, so that you can use
## a simple shell command to insert new sha256's into this file
## a simple shell command to insert new hashes into this file
## e.g. with emacs C-u M-x shell-command
##
## nix-prefetch-url sources.nix -A {stable{,.mono,.gecko64,.gecko32}, unstable, staging, winetricks}
# here we wrap fetchurl and fetchFromGitHub, in order to be able to pass additional args around it
let fetchurl = args@{url, sha256, ...}:
pkgs.fetchurl { inherit url sha256; } // args;
fetchFromGitHub = args@{owner, repo, rev, sha256, ...}:
pkgs.fetchFromGitHub { inherit owner repo rev sha256; } // args;
fetchFromGitLab = args@{domain, owner, repo, rev, sha256, ...}:
pkgs.fetchFromGitLab { inherit domain owner repo rev sha256; } // args;
let fetchurl = args@{url, hash, ...}:
pkgs.fetchurl { inherit url hash; } // args;
fetchFromGitHub = args@{owner, repo, rev, hash, ...}:
pkgs.fetchFromGitHub { inherit owner repo rev hash; } // args;
fetchFromGitLab = args@{domain, owner, repo, rev, hash, ...}:
pkgs.fetchFromGitLab { inherit domain owner repo rev hash; } // args;
updateScriptPreamble = ''
set -eou pipefail
@ -24,27 +24,27 @@ let fetchurl = args@{url, sha256, ...}:
in rec {
stable = fetchurl rec {
version = "7.0.1";
url = "https://dl.winehq.org/wine/source/7.0/wine-${version}.tar.xz";
sha256 = "sha256-gHyqeBIbFiUPJA0oKKB8pOPGCXOeVSTvD0z4muSagWw=";
version = "8.0";
url = "https://dl.winehq.org/wine/source/8.0/wine-${version}.tar.xz";
hash = "sha256-AnLCCTj4chrkUQr6qLNgN0V91XZh5NZkIxB5uekceS4=";
## see http://wiki.winehq.org/Gecko
gecko32 = fetchurl rec {
version = "2.47.3";
url = "https://dl.winehq.org/wine/wine-gecko/${version}/wine-gecko-${version}-x86.msi";
sha256 = "sha256-5bmwbTzjVWRqjS5y4ETjfh4MjRhGTrGYWtzRh6f0jgE=";
hash = "sha256-5bmwbTzjVWRqjS5y4ETjfh4MjRhGTrGYWtzRh6f0jgE=";
};
gecko64 = fetchurl rec {
version = "2.47.3";
url = "https://dl.winehq.org/wine/wine-gecko/${version}/wine-gecko-${version}-x86_64.msi";
sha256 = "sha256-pT7pVDkrbR/j1oVF9uTiqXr7yNyLA6i0QzSVRc4TlnU=";
hash = "sha256-pT7pVDkrbR/j1oVF9uTiqXr7yNyLA6i0QzSVRc4TlnU=";
};
## see http://wiki.winehq.org/Mono
mono = fetchurl rec {
version = "7.0.0";
version = "7.4.0";
url = "https://dl.winehq.org/wine/wine-mono/${version}/wine-mono-${version}-x86.msi";
sha256 = "sha256-s35vyeWQ5YIkPcJdcqX8wzDDp5cN/cmKeoHSOEW6iQA=";
hash = "sha256-ZBP/Mo679+x2icZI/rNUbYEC3thlB50fvwMxsUs6sOw=";
};
patches = [
@ -54,14 +54,14 @@ in rec {
updateScript = writeShellScript "update-wine-stable" (''
${updateScriptPreamble}
major=''${UPDATE_NIX_OLD_VERSION%.*}
major=''${UPDATE_NIX_OLD_VERSION%%.*}
latest_stable=$(get_latest_wine_version "$major.0")
latest_gecko=$(get_latest_lib_version wine-gecko)
# Can't use autobump on stable because we don't want the path
# <source/7.0/wine-7.0.tar.xz> to become <source/7.0.1/wine-7.0.1.tar.xz>.
if [[ "$UPDATE_NIX_OLD_VERSION" != "$latest_stable" ]]; then
set_version_and_sha256 stable "$latest_stable" "$(nix-prefetch-url "$wine_url_base/source/$major.0/wine-$latest_stable.tar.xz")"
set_version_and_hash stable "$latest_stable" "$(nix-prefetch-url "$wine_url_base/source/$major.0/wine-$latest_stable.tar.xz")"
fi
autobump stable.gecko32 "$latest_gecko"
@ -72,27 +72,27 @@ in rec {
};
unstable = fetchurl rec {
# NOTE: Don't forget to change the SHA256 for staging as well.
version = "7.20";
url = "https://dl.winehq.org/wine/source/7.x/wine-${version}.tar.xz";
sha256 = "sha256-dRt58itan3LJ7BX3VbALE9PtBz6RaMPvStq9nbN9DVA=";
# NOTE: Don't forget to change the hash for staging as well.
version = "8.1";
url = "https://dl.winehq.org/wine/source/8.x/wine-${version}.tar.xz";
hash = "sha256-QSDuaz8pTZeq8scwNM8cLL8ToZXJTFx0pkaoH5JBJZg=";
inherit (stable) gecko32 gecko64 patches;
mono = fetchurl rec {
version = "7.4.0";
url = "https://dl.winehq.org/wine/wine-mono/${version}/wine-mono-${version}-x86.msi";
sha256 = "sha256-ZBP/Mo679+x2icZI/rNUbYEC3thlB50fvwMxsUs6sOw=";
hash = "sha256-ZBP/Mo679+x2icZI/rNUbYEC3thlB50fvwMxsUs6sOw=";
};
updateScript = writeShellScript "update-wine-unstable" ''
${updateScriptPreamble}
major=''${UPDATE_NIX_OLD_VERSION%.*}
major=''${UPDATE_NIX_OLD_VERSION%%.*}
latest_unstable=$(get_latest_wine_version "$major.x")
latest_mono=$(get_latest_lib_version wine-mono)
update_staging() {
staging_url=$(get_source_attr staging.url)
set_source_attr staging sha256 "\"$(to_sri "$(nix-prefetch-url --unpack "''${staging_url//$1/$2}")")\""
set_source_attr staging hash "\"$(to_sri "$(nix-prefetch-url --unpack "''${staging_url//$1/$2}")")\""
}
autobump unstable "$latest_unstable" "" update_staging
@ -105,7 +105,7 @@ in rec {
staging = fetchFromGitHub rec {
# https://github.com/wine-staging/wine-staging/releases
inherit (unstable) version;
sha256 = "sha256-yzZE06FBoPL65+m8MrKlmW5cSIcX3dZYAOY9wjEJaJw=";
hash = "sha256-5AzXXaRGyvfYxd3yXtAlZREv1wp6UqWdDRdnwmKVaUg=";
owner = "wine-staging";
repo = "wine-staging";
rev = "v${version}";
@ -115,12 +115,12 @@ in rec {
wayland = fetchFromGitLab rec {
# https://gitlab.collabora.com/alf/wine/-/tree/wayland
version = "7.20";
sha256 = "sha256-UrukAnlfrr6eeVwFSEOWSVSfyMHbMT1o1tfXxow61xY=";
version = "8.0";
hash = "sha256-whRnm21UyKZ4AQufNmctzivISVobnCeidmpYz65vlyk=";
domain = "gitlab.collabora.com";
owner = "alf";
repo = "wine";
rev = "1dc9821ef0b6109c74d0c95cd5418caf7f9feaf1";
rev = "2f80bd757739f2dd8da41abceae6b87d2c568152";
inherit (unstable) gecko32 gecko64;
@ -135,7 +135,7 @@ in rec {
if [[ "$wayland_rev" != "$latest_wayland_rev" ]]; then
latest_wayland=$(curl -s 'https://gitlab.collabora.com/alf/wine/-/raw/wayland/VERSION' | cut -f3 -d' ')
wayland_url=$(get_source_attr wayland.url)
set_version_and_sha256 wayland "$latest_wayland" "$(nix-prefetch-url --unpack "''${wayland_url/$wayland_rev/$latest_wayland_rev}")"
set_version_and_hash wayland "$latest_wayland" "$(nix-prefetch-url --unpack "''${wayland_url/$wayland_rev/$latest_wayland_rev}")"
set_source_attr wayland rev "\"$latest_wayland_rev\""
fi
@ -146,7 +146,7 @@ in rec {
winetricks = fetchFromGitHub rec {
# https://github.com/Winetricks/winetricks/releases
version = "20220411";
sha256 = "sha256-FjH10nZDYbqXI6/vKpZJKfv2maXSVkahNDf5UTU3eyU=";
hash = "sha256-FjH10nZDYbqXI6/vKpZJKfv2maXSVkahNDf5UTU3eyU=";
owner = "Winetricks";
repo = "winetricks";
rev = version;

View File

@ -14,9 +14,9 @@ set_source_attr() {
sed_exprs+=(-e "${line}s@[^ ].*\$@$name = $value;@")
}
set_version_and_sha256() {
set_version_and_hash() {
set_source_attr "$1" version "\"$2\""
set_source_attr "$1" sha256 "\"$(to_sri "$3")\""
set_source_attr "$1" hash "\"$(to_sri "$3")\""
}
get_latest_wine_version() {
@ -39,7 +39,7 @@ autobump() {
version=$(get_source_attr "$attr.version")
if [[ "$version" != "$latest" ]]; then
url=$(get_source_attr "$attr.url")
set_version_and_sha256 "$attr" "$latest" "$($fetcher "${url//$version/$latest}")"
set_version_and_hash "$attr" "$latest" "$($fetcher "${url//$version/$latest}")"
[[ -z "$more" ]] || $more "$version" "$latest"
fi
}

View File

@ -1,28 +0,0 @@
{ lib, stdenv, fetchurl, moltenvk, vulkan-headers, spirv-headers, vulkan-loader, flex, bison }:
#TODO: unstable
stdenv.mkDerivation rec {
pname = "vkd3d";
version = "1.5";
src = fetchurl {
url = "https://dl.winehq.org/vkd3d/source/vkd3d-${version}.tar.xz";
sha256 = "sha256-47PDVfRvfL/BnnEKR4vLK+4mel82Dn5kBiOM6lLOLPw=";
};
nativeBuildInputs = [ flex bison ];
buildInputs = [ vulkan-headers spirv-headers ]
++ [ (if stdenv.isDarwin then moltenvk else vulkan-loader) ];
enableParallelBuilding = true;
meta = with lib; {
description = "A 3d library build on top on Vulkan with a similar api to DirectX 12";
homepage = "https://source.winehq.org/git/vkd3d.git";
license = licenses.lgpl21;
platforms = platforms.unix;
maintainers = [ maintainers.marius851000 ];
};
}

View File

@ -3,6 +3,7 @@
, fetchFromGitHub
, substituteAll
, pkgsi686Linux
, fetchpatch
, dbus
, meson
, ninja
@ -103,6 +104,14 @@ in multiStdenv.mkDerivation rec {
# Patch the chainloader to search for libyabridge through NIX_PROFILES
./libyabridge-from-nix-profiles.patch
# Remove with next yabridge update
(fetchpatch {
name = "fix-for-wine-8.0.patch";
url = "https://github.com/robbert-vdh/yabridge/commit/29acd40a9add635e2cb40ecc54c88d65604a7a2a.patch";
sha256 = "sha256-hVxa/FqH7d938Z/VjHdhmYLCLPZoa9C4xKSKRKiVPSU=";
includes = [ "meson.build" ];
})
];
postPatch = ''

View File

@ -28038,7 +28038,7 @@ with pkgs;
ahoviewer = callPackage ../applications/graphics/ahoviewer { };
airwave = callPackage ../applications/audio/airwave { };
airwave = libsForQt5.callPackage ../applications/audio/airwave { };
akira-unstable = callPackage ../applications/graphics/akira { };

View File

@ -30,7 +30,6 @@ rec {
full = base.override {
gtkSupport = stdenv.isLinux;
gstreamerSupport = true;
openalSupport = true;
openclSupport = true;
odbcSupport = true;
netapiSupport = stdenv.isLinux;
@ -39,8 +38,6 @@ rec {
v4lSupport = stdenv.isLinux;
gphoto2Support = true;
krb5Support = true;
ldapSupport = true;
vkd3dSupport = stdenv.isLinux;
embedInstallers = true;
};