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-P1i12vw9KQOTL7QBxjKPSlda5rvoyl7DGmuuD5iVEQs=";
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`
29 "-p:PublishSingleFile=false"
33 substituteInPlace lib/FFXIVQuickLauncher/src/XIVLauncher.Common/Game/Patch/Acquisition/Aria/AriaHttpPatchAcquisition.cs \
34 --replace 'ariaPath = "aria2c"' 'ariaPath = "${aria2}/bin/aria2c"'
38 mkdir -p $out/share/pixmaps
39 cp src/XIVLauncher.Core/Resources/logo.png $out/share/pixmaps/xivlauncher.png
42 postFixup = lib.optionalString useSteamRun (let
43 steam-run = (steam.override {
44 extraPkgs = pkgs: [ pkgs.libunwind ];
47 substituteInPlace $out/bin/XIVLauncher.Core \
48 --replace 'exec' 'exec ${steam-run}/bin/steam-run'
50 wrapProgram $out/bin/XIVLauncher.Core --prefix GST_PLUGIN_SYSTEM_PATH_1_0 ":" "$GST_PLUGIN_SYSTEM_PATH_1_0"
51 # the reference to aria2 gets mangled as UTF-16LE and isn't detectable by nix: https://github.com/NixOS/nixpkgs/issues/220065
52 mkdir -p $out/nix-support
53 echo ${aria2} >> $out/nix-support/depends
56 executables = [ "XIVLauncher.Core" ];
58 runtimeDeps = [ SDL2 libsecret glib gnutls ];
63 exec = "XIVLauncher.Core";
65 desktopName = "XIVLauncher";
66 comment = meta.description;
67 categories = [ "Game" ];
68 startupWMClass = "XIVLauncher.Core";
73 description = "Custom launcher for FFXIV";
74 homepage = "https://github.com/goatcorp/XIVLauncher.Core";
75 license = licenses.gpl3;
76 maintainers = with maintainers; [ sersorrel witchof0x20 ];
77 platforms = [ "x86_64-linux" ];
78 mainProgram = "XIVLauncher.Core";