1 { lib, buildDotnetModule, fetchFromGitHub, dotnetCorePackages, SDL2, libsecret, glib, gnutls, aria2, steam, gst_all_1
2 , copyDesktopItems, makeDesktopItem, makeWrapper
3 , useSteamRun ? true }:
8 buildDotnetModule rec {
12 src = fetchFromGitHub {
14 repo = "XIVLauncher.Core";
16 hash = "sha256-vf9cGY+JvMBpQliS1LDmbWjtAbXByrIeXThKtJGQrO8=";
17 fetchSubmodules = true;
20 nativeBuildInputs = [ copyDesktopItems makeWrapper ];
22 buildInputs = with gst_all_1; [ gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav ];
24 projectFile = "src/XIVLauncher.Core/XIVLauncher.Core.csproj";
25 nugetDeps = ./deps.nix; # File generated with `nix-build -A xivlauncher.passthru.fetch-deps`
27 # please do not unpin these even if they match the defaults, xivlauncher is sensitive to .NET versions
28 dotnet-sdk = dotnetCorePackages.sdk_8_0;
29 dotnet-runtime = dotnetCorePackages.runtime_8_0;
33 "-p:PublishSingleFile=false"
37 substituteInPlace lib/FFXIVQuickLauncher/src/XIVLauncher.Common/Game/Patch/Acquisition/Aria/AriaHttpPatchAcquisition.cs \
38 --replace-fail 'ariaPath = "aria2c"' 'ariaPath = "${aria2}/bin/aria2c"'
42 mkdir -p $out/share/pixmaps
43 cp src/XIVLauncher.Core/Resources/logo.png $out/share/pixmaps/xivlauncher.png
46 postFixup = lib.optionalString useSteamRun (let
47 steam-run = (steam.override {
48 extraPkgs = pkgs: [ pkgs.libunwind ];
54 substituteInPlace $out/bin/XIVLauncher.Core \
55 --replace-fail 'exec' 'exec ${steam-run}/bin/steam-run'
57 wrapProgram $out/bin/XIVLauncher.Core --prefix GST_PLUGIN_SYSTEM_PATH_1_0 ":" "$GST_PLUGIN_SYSTEM_PATH_1_0"
58 # the reference to aria2 gets mangled as UTF-16LE and isn't detectable by nix: https://github.com/NixOS/nixpkgs/issues/220065
59 mkdir -p $out/nix-support
60 echo ${aria2} >> $out/nix-support/depends
63 executables = [ "XIVLauncher.Core" ];
65 runtimeDeps = [ SDL2 libsecret glib gnutls ];
70 exec = "XIVLauncher.Core";
72 desktopName = "XIVLauncher";
73 comment = meta.description;
74 categories = [ "Game" ];
75 startupWMClass = "XIVLauncher.Core";
80 description = "Custom launcher for FFXIV";
81 homepage = "https://github.com/goatcorp/XIVLauncher.Core";
82 license = licenses.gpl3;
83 maintainers = with maintainers; [ sersorrel witchof0x20 ];
84 platforms = [ "x86_64-linux" ];
85 mainProgram = "XIVLauncher.Core";