2022-05-18 14:49:53 +00:00
|
|
|
{ lib, buildDotnetModule, fetchFromGitHub, dotnetCorePackages, SDL2, libsecret, glib, gnutls, aria2, steam-run
|
|
|
|
, copyDesktopItems, makeDesktopItem
|
|
|
|
, useSteamRun ? true }:
|
|
|
|
|
|
|
|
let
|
2022-11-02 22:02:43 +00:00
|
|
|
rev = "1.0.2";
|
2022-05-18 14:49:53 +00:00
|
|
|
in
|
|
|
|
buildDotnetModule rec {
|
|
|
|
pname = "XIVLauncher";
|
2022-11-02 22:02:43 +00:00
|
|
|
version = rev;
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "goatcorp";
|
2022-11-02 22:02:43 +00:00
|
|
|
repo = "XIVLauncher.Core";
|
2022-05-18 14:49:53 +00:00
|
|
|
inherit rev;
|
2022-11-02 22:02:43 +00:00
|
|
|
sha256 = "DlSMxIbgzL5cy+A5nm7ZaA2A0TdINtq2GHW27uxORKI=";
|
|
|
|
fetchSubmodules = true;
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ copyDesktopItems ];
|
|
|
|
|
|
|
|
projectFile = "src/XIVLauncher.Core/XIVLauncher.Core.csproj";
|
2022-09-09 14:08:57 +00:00
|
|
|
nugetDeps = ./deps.nix; # File generated with `nix-build -A xivlauncher.passthru.fetch-deps`
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
dotnetFlags = [
|
|
|
|
"--runtime linux-x64"
|
|
|
|
"-p:BuildHash=${rev}"
|
|
|
|
];
|
|
|
|
|
|
|
|
dotnetBuildFlags = [
|
|
|
|
"--no-self-contained"
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2022-11-02 22:02:43 +00:00
|
|
|
substituteInPlace lib/FFXIVQuickLauncher/src/XIVLauncher.Common/Game/Patch/Acquisition/Aria/AriaHttpPatchAcquisition.cs \
|
2022-05-18 14:49:53 +00:00
|
|
|
--replace 'ariaPath = "aria2c"' 'ariaPath = "${aria2}/bin/aria2c"'
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/pixmaps
|
|
|
|
cp src/XIVLauncher.Core/Resources/logo.png $out/share/pixmaps/xivlauncher.png
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = lib.optionalString useSteamRun ''
|
|
|
|
substituteInPlace $out/bin/XIVLauncher.Core \
|
|
|
|
--replace 'exec' 'exec ${steam-run}/bin/steam-run'
|
|
|
|
'';
|
|
|
|
|
|
|
|
executables = [ "XIVLauncher.Core" ];
|
|
|
|
|
|
|
|
runtimeDeps = [ SDL2 libsecret glib gnutls ];
|
|
|
|
|
|
|
|
desktopItems = [
|
|
|
|
(makeDesktopItem {
|
|
|
|
name = "xivlauncher";
|
|
|
|
exec = "XIVLauncher.Core";
|
|
|
|
icon = "xivlauncher";
|
|
|
|
desktopName = "XIVLauncher";
|
|
|
|
comment = meta.description;
|
|
|
|
categories = [ "Game" ];
|
2022-11-02 22:02:43 +00:00
|
|
|
startupWMClass = "XIVLauncher.Core";
|
2022-05-18 14:49:53 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Custom launcher for FFXIV";
|
|
|
|
homepage = "https://github.com/goatcorp/FFXIVQuickLauncher";
|
|
|
|
license = licenses.gpl3;
|
2022-09-09 14:08:57 +00:00
|
|
|
maintainers = with maintainers; [ ashkitten sersorrel ];
|
2022-05-18 14:49:53 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2022-11-02 22:02:43 +00:00
|
|
|
mainProgram = "XIVLauncher.Core";
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
|
|
|
}
|