unreal_engine_bug_flake/flake.nix

72 lines
2.1 KiB
Nix
Raw Normal View History

2025-01-18 18:01:44 +01:00
{
description = "Wine minimal configuration to reproduce the problem";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachSystem flake-utils.lib.allSystems (system:
let
pkgs = import nixpkgs { inherit system; };
inherit (pkgs.lib.strings) concatStringsSep;
inherit (pkgs) writeShellScriptBin fetchurl;
epic_games_launcher = fetchurl {
url = "https://launcher-public-service-prod06.ol.epicgames.com/launcher/api/installer/download/EpicGamesLauncherInstaller.msi";
name = "EpicGamesLauncherInstaller.msi";
2025-01-18 18:02:35 +01:00
# hash = pkgs.lib.fakeHash;
2025-01-18 18:01:44 +01:00
hash = "sha256-vbd+h7nWZmNOGC6kJILZVZElyo5iwjmbitLGtCOVqqg=";
};
# concat winetricks args
winetricksArgs = concatStringsSep " " [ "corefonts" ];
install_script = writeShellScriptBin "install" ''
2025-01-18 18:18:02 +01:00
echo "Installing Dependencies"
2025-01-18 18:01:44 +01:00
winetricks -q -f ${winetricksArgs}
wineserver -k
2025-01-18 18:18:02 +01:00
echo "Dependencies Installed"
2025-01-18 18:01:44 +01:00
2025-01-18 18:18:02 +01:00
echo "Installing Epic Games Launcher"
wine64 ${epic_games_launcher} /S
2025-01-18 18:01:44 +01:00
wineserver -k
2025-01-18 18:18:02 +01:00
echo "Epic Games Launcher Installed"
2025-01-18 18:01:44 +01:00
'';
clean_script = writeShellScriptBin "clean" ''
rm -rf $WINEPREFIX
'';
run_script = writeShellScriptBin "run" ''
'';
in
{
devShells = {
default = pkgs.mkShell {
packages = with pkgs; [
2025-01-18 18:18:02 +01:00
wine64Packages.unstableFull
2025-01-18 18:01:44 +01:00
winetricks
install_script
run_script
clean_script
];
shellHook = ''
export WINETRICKS_LATEST_VERSION_CHECK=disabled
export WINEPREFIX=$(pwd)/wine_prefix
export WINEARCH="win64"
export WINEDEBUG=-all
if [ ! -d "$WINEPREFIX" ]; then
install
fi
'';
};
};
});
}