unreal_engine_bug_flake/flake.nix
2025-01-18 18:01:44 +01:00

69 lines
1.9 KiB
Nix

{
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";
# hash = plks.lib.fakeHash;
hash = "sha256-vbd+h7nWZmNOGC6kJILZVZElyo5iwjmbitLGtCOVqqg=";
};
# concat winetricks args
winetricksArgs = concatStringsSep " " [ "corefonts" ];
install_script = writeShellScriptBin "install" ''
# install tricks
winetricks -q -f ${winetricksArgs}
wineserver -k
# Install Epic Games Launcher
wine ${epic_games_launcher} /S
wineserver -k
'';
clean_script = writeShellScriptBin "clean" ''
rm -rf $WINEPREFIX
'';
run_script = writeShellScriptBin "run" ''
'';
in
{
devShells = {
default = pkgs.mkShell {
packages = with pkgs; [
winePackages.unstableFull
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
'';
};
};
});
}