2021-11-14 21:19:26 +00:00
|
|
|
{ lib
|
|
|
|
, buildDotnetModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, dotnetCorePackages
|
|
|
|
, libkrb5
|
|
|
|
, zlib
|
|
|
|
, openssl
|
2021-12-04 14:15:04 +00:00
|
|
|
, callPackage
|
2021-11-14 21:19:26 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildDotnetModule rec {
|
2023-06-26 18:45:43 +00:00
|
|
|
pname = "ArchiSteamFarm";
|
2022-04-13 10:09:15 +00:00
|
|
|
# nixpkgs-update: no auto update
|
2024-06-09 00:54:29 +00:00
|
|
|
version = "6.0.3.4";
|
2021-11-14 21:19:26 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-06-26 18:45:43 +00:00
|
|
|
owner = "JustArchiNET";
|
|
|
|
repo = "ArchiSteamFarm";
|
2021-11-14 21:19:26 +00:00
|
|
|
rev = version;
|
2024-06-09 00:54:29 +00:00
|
|
|
hash = "sha256-qYB94SJYCwcUrXdKtD+ZdiPRpwXg3rOHVmFWD+Y1ZXg=";
|
2020-06-15 17:29:02 +00:00
|
|
|
};
|
|
|
|
|
2023-12-04 20:59:49 +00:00
|
|
|
dotnet-runtime = dotnetCorePackages.aspnetcore_8_0;
|
|
|
|
dotnet-sdk = dotnetCorePackages.sdk_8_0;
|
2021-11-30 04:43:41 +00:00
|
|
|
|
2022-08-22 19:50:30 +00:00
|
|
|
nugetDeps = ./deps.nix;
|
|
|
|
|
2021-11-14 21:19:26 +00:00
|
|
|
projectFile = "ArchiSteamFarm.sln";
|
2024-06-09 00:54:29 +00:00
|
|
|
executable = "ArchiSteamFarm";
|
2022-12-30 16:36:18 +00:00
|
|
|
dotnetFlags = [
|
2024-06-09 00:54:29 +00:00
|
|
|
"-p:UseAppHost=false"
|
2022-12-30 16:36:18 +00:00
|
|
|
];
|
2023-03-10 17:05:55 +00:00
|
|
|
dotnetInstallFlags = [
|
2023-12-04 20:59:49 +00:00
|
|
|
"--framework=net8.0"
|
2023-03-10 17:05:55 +00:00
|
|
|
];
|
2020-05-20 16:49:01 +00:00
|
|
|
|
2021-11-14 21:19:26 +00:00
|
|
|
runtimeDeps = [ libkrb5 zlib openssl ];
|
2020-06-15 17:29:02 +00:00
|
|
|
|
2021-11-14 21:19:26 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2022-12-30 16:36:18 +00:00
|
|
|
preBuild = ''
|
2024-05-15 23:10:39 +00:00
|
|
|
dotnetProjectFiles=(ArchiSteamFarm)
|
2022-12-30 16:36:18 +00:00
|
|
|
'';
|
|
|
|
|
2021-11-14 21:19:26 +00:00
|
|
|
preInstall = ''
|
|
|
|
# A mutable path, with this directory tree must be set. By default, this would point at the nix store causing errors.
|
|
|
|
makeWrapperArgs+=(
|
2021-12-04 14:15:04 +00:00
|
|
|
--run 'mkdir -p ~/.config/archisteamfarm/{config,logs,plugins}'
|
2021-11-30 04:43:41 +00:00
|
|
|
--set "ASF_PATH" "~/.config/archisteamfarm"
|
2021-11-14 21:19:26 +00:00
|
|
|
)
|
2020-05-20 16:49:01 +00:00
|
|
|
'';
|
|
|
|
|
2022-12-30 16:36:18 +00:00
|
|
|
postInstall = ''
|
|
|
|
buildPlugin() {
|
2023-03-10 17:05:55 +00:00
|
|
|
echo "Publishing plugin $1"
|
2022-12-30 16:36:18 +00:00
|
|
|
dotnet publish $1 -p:ContinuousIntegrationBuild=true -p:Deterministic=true \
|
2023-11-27 23:05:55 +00:00
|
|
|
--output $out/lib/ArchiSteamFarm/plugins/$1 --configuration Release \
|
2024-01-11 17:00:33 +00:00
|
|
|
-p:UseAppHost=false
|
2024-06-09 00:54:29 +00:00
|
|
|
}
|
2023-01-17 01:05:24 +00:00
|
|
|
|
2024-06-09 00:54:29 +00:00
|
|
|
buildPlugin ArchiSteamFarm.OfficialPlugins.ItemsMatcher
|
|
|
|
buildPlugin ArchiSteamFarm.OfficialPlugins.MobileAuthenticator
|
|
|
|
buildPlugin ArchiSteamFarm.OfficialPlugins.Monitoring
|
|
|
|
buildPlugin ArchiSteamFarm.OfficialPlugins.SteamTokenDumper
|
|
|
|
|
|
|
|
chmod +x $out/lib/ArchiSteamFarm/ArchiSteamFarm.dll
|
|
|
|
wrapDotnetProgram $out/lib/ArchiSteamFarm/ArchiSteamFarm.dll $out/bin/ArchiSteamFarm
|
|
|
|
substituteInPlace $out/bin/ArchiSteamFarm \
|
|
|
|
--replace-fail "exec " "exec dotnet "
|
2022-12-30 16:36:18 +00:00
|
|
|
'';
|
|
|
|
|
2021-12-04 14:15:04 +00:00
|
|
|
passthru = {
|
2022-12-30 20:08:48 +00:00
|
|
|
# nix-shell maintainers/scripts/update.nix --argstr package ArchiSteamFarm
|
2022-06-06 00:13:56 +00:00
|
|
|
updateScript = ./update.sh;
|
2021-12-04 14:15:04 +00:00
|
|
|
ui = callPackage ./web-ui { };
|
|
|
|
};
|
2021-11-14 21:19:26 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-05-20 16:49:01 +00:00
|
|
|
description = "Application with primary purpose of idling Steam cards from multiple accounts simultaneously";
|
|
|
|
homepage = "https://github.com/JustArchiNET/ArchiSteamFarm";
|
|
|
|
license = licenses.asl20;
|
2023-10-18 15:54:16 +00:00
|
|
|
mainProgram = "ArchiSteamFarm";
|
2024-02-19 12:25:57 +00:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
2020-05-20 16:49:01 +00:00
|
|
|
};
|
|
|
|
}
|