Loading pkgs/applications/emulators/wine/base.nix +57 −9 Original line number Diff line number Diff line Loading @@ -24,14 +24,21 @@ buildScript ? null, configureFlags ? [ ], mainProgram ? "wine", # Staging support useStaging ? false, autoconf, hexdump, perl, python3, gitMinimal, }: with import ./util.nix { inherit lib; }; let prevName = pname; prevConfigFlags = configureFlags; toBuildInputs = pkgArches: archPkgs: lib.concatLists (map archPkgs pkgArches); setupHookDarwin = makeSetupHook { name = "darwin-mingw-hook"; substitutions = { Loading Loading @@ -61,7 +68,15 @@ let badPlatforms = lib.optional ( !supportFlags.mingwSupport || lib.any (flag: supportFlags.${flag}) darwinUnsupportedFlags ) "x86_64-darwin"; # Staging patches (from src.staging when useStaging is true) stagingPatches = src.staging or null; in assert useStaging -> stagingPatches != null && lib.versions.majorMinor version == lib.versions.majorMinor stagingPatches.version; stdenv.mkDerivation ( finalAttrs: lib.optionalAttrs (buildScript != null) { builder = buildScript; } Loading Loading @@ -89,7 +104,14 @@ stdenv.mkDerivation ( nativeBuildInputs = with supportFlags; [ lib.optionals useStaging [ autoconf hexdump perl python3 gitMinimal ] ++ [ bison flex fontforge Loading @@ -101,9 +123,20 @@ stdenv.mkDerivation ( mingwGccs ++ lib.optional stdenv.hostPlatform.isDarwin setupHookDarwin ); buildInputs = toBuildInputs pkgArches ( buildInputs = lib.optionals useStaging ( toBuildInputs pkgArches ( pkgs: [ pkgs.perl pkgs.autoconf pkgs.gitMinimal ] ++ lib.optional stdenv.hostPlatform.isLinux pkgs.util-linux ) ) ++ toBuildInputs pkgArches ( with supportFlags; ( pkgs: [ pkgs.freetype Loading Loading @@ -191,11 +224,24 @@ stdenv.mkDerivation ( ++ lib.optionals ffmpegSupport [ pkgs.ffmpeg-headless ] ) ); inherit patches; prePatch = if !useStaging then null else '' patchShebangs tools cp -r ${stagingPatches}/patches ${stagingPatches}/staging . chmod +w patches patchShebangs ./patches/gitapply.sh python3 ./staging/patchinstall.py DESTDIR="$PWD" --all ${ lib.concatMapStringsSep " " (ps: "-W ${ps}") stagingPatches.disabledPatchsets } ''; configureFlags = prevConfigFlags ++ lib.optionals supportFlags.waylandSupport [ "--with-wayland" ] Loading Loading @@ -291,7 +337,9 @@ stdenv.mkDerivation ( fromSource binaryNativeCode # mono, gecko ]; description = "Open Source implementation of the Windows API on top of X, OpenGL, and Unix"; description = "Open Source implementation of the Windows API on top of X, OpenGL, and Unix" + lib.optionalString useStaging " (with staging patches)"; inherit badPlatforms platforms; maintainers = with lib.maintainers; [ avnik Loading pkgs/applications/emulators/wine/default.nix +3 −4 Original line number Diff line number Diff line Loading @@ -100,10 +100,9 @@ let .${wineRelease} or null; in if baseRelease != null then callPackage ./staging.nix { wineUnstable = (wine-build wineBuild baseRelease).override { (wine-build wineBuild baseRelease).override { inherit wineRelease; }; useStaging = true; } else wine-build wineBuild wineRelease pkgs/applications/emulators/wine/packages.nix +14 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,12 @@ moltenvk, wineRelease ? "stable", supportFlags, # Staging native build deps autoconf, hexdump, perl, python3, gitMinimal, }: let Loading @@ -25,6 +31,14 @@ with src; patches moltenvk wineRelease # Forcing these `nativeBuildInputs` used in the `staging` to come # from ambient `pkgs`, rather than being provided by # `pkgsi686Linux.callPackage` for that platform. autoconf hexdump perl python3 gitMinimal ; pkgArches = [ pkgsi686Linux ]; geckos = [ gecko32 ]; Loading pkgs/applications/emulators/wine/staging.nixdeleted 100644 → 0 +0 −53 Original line number Diff line number Diff line { lib, stdenv, callPackage, autoconf, hexdump, perl, python3, wineUnstable, gitMinimal, }: with callPackage ./util.nix { }; let patch = wineUnstable.src.staging; build-inputs = pkgNames: extra: (mkBuildInputs wineUnstable.pkgArches pkgNames) ++ extra; in assert lib.versions.majorMinor wineUnstable.version == lib.versions.majorMinor patch.version; wineUnstable.overrideAttrs (self: { buildInputs = build-inputs ( [ "perl" "autoconf" "gitMinimal" ] ++ lib.optional stdenv.hostPlatform.isLinux "util-linux" ) self.buildInputs; nativeBuildInputs = [ autoconf hexdump perl python3 gitMinimal ] ++ self.nativeBuildInputs; prePatch = self.prePatch or "" + '' patchShebangs tools cp -r ${patch}/patches ${patch}/staging . chmod +w patches patchShebangs ./patches/gitapply.sh python3 ./staging/patchinstall.py DESTDIR="$PWD" --all ${ lib.concatMapStringsSep " " (ps: "-W ${ps}") patch.disabledPatchsets } ''; }) // { meta = wineUnstable.meta // { description = wineUnstable.meta.description + " (with staging patches)"; }; } pkgs/applications/emulators/wine/util.nixdeleted 100644 → 0 +0 −6 Original line number Diff line number Diff line { lib }: rec { toPackages = pkgNames: pkgs: map (pn: lib.getAttr pn pkgs) pkgNames; toBuildInputs = pkgArches: archPkgs: lib.concatLists (map archPkgs pkgArches); mkBuildInputs = pkgArches: pkgNames: toBuildInputs pkgArches (toPackages pkgNames); } Loading
pkgs/applications/emulators/wine/base.nix +57 −9 Original line number Diff line number Diff line Loading @@ -24,14 +24,21 @@ buildScript ? null, configureFlags ? [ ], mainProgram ? "wine", # Staging support useStaging ? false, autoconf, hexdump, perl, python3, gitMinimal, }: with import ./util.nix { inherit lib; }; let prevName = pname; prevConfigFlags = configureFlags; toBuildInputs = pkgArches: archPkgs: lib.concatLists (map archPkgs pkgArches); setupHookDarwin = makeSetupHook { name = "darwin-mingw-hook"; substitutions = { Loading Loading @@ -61,7 +68,15 @@ let badPlatforms = lib.optional ( !supportFlags.mingwSupport || lib.any (flag: supportFlags.${flag}) darwinUnsupportedFlags ) "x86_64-darwin"; # Staging patches (from src.staging when useStaging is true) stagingPatches = src.staging or null; in assert useStaging -> stagingPatches != null && lib.versions.majorMinor version == lib.versions.majorMinor stagingPatches.version; stdenv.mkDerivation ( finalAttrs: lib.optionalAttrs (buildScript != null) { builder = buildScript; } Loading Loading @@ -89,7 +104,14 @@ stdenv.mkDerivation ( nativeBuildInputs = with supportFlags; [ lib.optionals useStaging [ autoconf hexdump perl python3 gitMinimal ] ++ [ bison flex fontforge Loading @@ -101,9 +123,20 @@ stdenv.mkDerivation ( mingwGccs ++ lib.optional stdenv.hostPlatform.isDarwin setupHookDarwin ); buildInputs = toBuildInputs pkgArches ( buildInputs = lib.optionals useStaging ( toBuildInputs pkgArches ( pkgs: [ pkgs.perl pkgs.autoconf pkgs.gitMinimal ] ++ lib.optional stdenv.hostPlatform.isLinux pkgs.util-linux ) ) ++ toBuildInputs pkgArches ( with supportFlags; ( pkgs: [ pkgs.freetype Loading Loading @@ -191,11 +224,24 @@ stdenv.mkDerivation ( ++ lib.optionals ffmpegSupport [ pkgs.ffmpeg-headless ] ) ); inherit patches; prePatch = if !useStaging then null else '' patchShebangs tools cp -r ${stagingPatches}/patches ${stagingPatches}/staging . chmod +w patches patchShebangs ./patches/gitapply.sh python3 ./staging/patchinstall.py DESTDIR="$PWD" --all ${ lib.concatMapStringsSep " " (ps: "-W ${ps}") stagingPatches.disabledPatchsets } ''; configureFlags = prevConfigFlags ++ lib.optionals supportFlags.waylandSupport [ "--with-wayland" ] Loading Loading @@ -291,7 +337,9 @@ stdenv.mkDerivation ( fromSource binaryNativeCode # mono, gecko ]; description = "Open Source implementation of the Windows API on top of X, OpenGL, and Unix"; description = "Open Source implementation of the Windows API on top of X, OpenGL, and Unix" + lib.optionalString useStaging " (with staging patches)"; inherit badPlatforms platforms; maintainers = with lib.maintainers; [ avnik Loading
pkgs/applications/emulators/wine/default.nix +3 −4 Original line number Diff line number Diff line Loading @@ -100,10 +100,9 @@ let .${wineRelease} or null; in if baseRelease != null then callPackage ./staging.nix { wineUnstable = (wine-build wineBuild baseRelease).override { (wine-build wineBuild baseRelease).override { inherit wineRelease; }; useStaging = true; } else wine-build wineBuild wineRelease
pkgs/applications/emulators/wine/packages.nix +14 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,12 @@ moltenvk, wineRelease ? "stable", supportFlags, # Staging native build deps autoconf, hexdump, perl, python3, gitMinimal, }: let Loading @@ -25,6 +31,14 @@ with src; patches moltenvk wineRelease # Forcing these `nativeBuildInputs` used in the `staging` to come # from ambient `pkgs`, rather than being provided by # `pkgsi686Linux.callPackage` for that platform. autoconf hexdump perl python3 gitMinimal ; pkgArches = [ pkgsi686Linux ]; geckos = [ gecko32 ]; Loading
pkgs/applications/emulators/wine/staging.nixdeleted 100644 → 0 +0 −53 Original line number Diff line number Diff line { lib, stdenv, callPackage, autoconf, hexdump, perl, python3, wineUnstable, gitMinimal, }: with callPackage ./util.nix { }; let patch = wineUnstable.src.staging; build-inputs = pkgNames: extra: (mkBuildInputs wineUnstable.pkgArches pkgNames) ++ extra; in assert lib.versions.majorMinor wineUnstable.version == lib.versions.majorMinor patch.version; wineUnstable.overrideAttrs (self: { buildInputs = build-inputs ( [ "perl" "autoconf" "gitMinimal" ] ++ lib.optional stdenv.hostPlatform.isLinux "util-linux" ) self.buildInputs; nativeBuildInputs = [ autoconf hexdump perl python3 gitMinimal ] ++ self.nativeBuildInputs; prePatch = self.prePatch or "" + '' patchShebangs tools cp -r ${patch}/patches ${patch}/staging . chmod +w patches patchShebangs ./patches/gitapply.sh python3 ./staging/patchinstall.py DESTDIR="$PWD" --all ${ lib.concatMapStringsSep " " (ps: "-W ${ps}") patch.disabledPatchsets } ''; }) // { meta = wineUnstable.meta // { description = wineUnstable.meta.description + " (with staging patches)"; }; }
pkgs/applications/emulators/wine/util.nixdeleted 100644 → 0 +0 −6 Original line number Diff line number Diff line { lib }: rec { toPackages = pkgNames: pkgs: map (pn: lib.getAttr pn pkgs) pkgNames; toBuildInputs = pkgArches: archPkgs: lib.concatLists (map archPkgs pkgArches); mkBuildInputs = pkgArches: pkgNames: toBuildInputs pkgArches (toPackages pkgNames); }