2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildDotnetModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, dotnetCorePackages
|
|
|
|
, libkrb5
|
|
|
|
, zlib
|
|
|
|
, openssl
|
2022-01-13 20:06:32 +00:00
|
|
|
, callPackage
|
2021-12-06 16:07:01 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildDotnetModule rec {
|
2023-07-15 17:15:38 +00:00
|
|
|
pname = "ArchiSteamFarm";
|
2022-04-15 01:41:22 +00:00
|
|
|
# nixpkgs-update: no auto update
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "6.0.3.4";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-07-15 17:15:38 +00:00
|
|
|
owner = "JustArchiNET";
|
|
|
|
repo = "ArchiSteamFarm";
|
2021-12-06 16:07:01 +00:00
|
|
|
rev = version;
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-qYB94SJYCwcUrXdKtD+ZdiPRpwXg3rOHVmFWD+Y1ZXg=";
|
2020-06-18 07:06:33 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
dotnet-runtime = dotnetCorePackages.aspnetcore_8_0;
|
|
|
|
dotnet-sdk = dotnetCorePackages.sdk_8_0;
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2022-09-14 18:05:37 +00:00
|
|
|
nugetDeps = ./deps.nix;
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
projectFile = "ArchiSteamFarm.sln";
|
2024-06-20 14:57:18 +00:00
|
|
|
executable = "ArchiSteamFarm";
|
2023-01-11 07:51:40 +00:00
|
|
|
dotnetFlags = [
|
2024-06-20 14:57:18 +00:00
|
|
|
"-p:UseAppHost=false"
|
2023-01-11 07:51:40 +00:00
|
|
|
];
|
2023-03-24 00:07:29 +00:00
|
|
|
dotnetInstallFlags = [
|
2024-01-02 11:29:13 +00:00
|
|
|
"--framework=net8.0"
|
2023-03-24 00:07:29 +00:00
|
|
|
];
|
2020-05-29 06:06:01 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
runtimeDeps = [ libkrb5 zlib openssl ];
|
2020-06-18 07:06:33 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
preBuild = ''
|
2024-06-20 14:57:18 +00:00
|
|
|
dotnetProjectFiles=(ArchiSteamFarm)
|
2023-01-11 07:51:40 +00:00
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +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+=(
|
2022-01-13 20:06:32 +00:00
|
|
|
--run 'mkdir -p ~/.config/archisteamfarm/{config,logs,plugins}'
|
|
|
|
--set "ASF_PATH" "~/.config/archisteamfarm"
|
2021-12-06 16:07:01 +00:00
|
|
|
)
|
2020-05-29 06:06:01 +00:00
|
|
|
'';
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
postInstall = ''
|
|
|
|
buildPlugin() {
|
2023-03-24 00:07:29 +00:00
|
|
|
echo "Publishing plugin $1"
|
2023-01-11 07:51:40 +00:00
|
|
|
dotnet publish $1 -p:ContinuousIntegrationBuild=true -p:Deterministic=true \
|
2024-01-02 11:29:13 +00:00
|
|
|
--output $out/lib/ArchiSteamFarm/plugins/$1 --configuration Release \
|
2024-01-25 14:12:00 +00:00
|
|
|
-p:UseAppHost=false
|
2024-06-20 14:57:18 +00:00
|
|
|
}
|
2023-02-02 18:25:31 +00:00
|
|
|
|
2024-06-20 14:57:18 +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 "
|
2023-01-11 07:51:40 +00:00
|
|
|
'';
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
passthru = {
|
2023-01-11 07:51:40 +00:00
|
|
|
# nix-shell maintainers/scripts/update.nix --argstr package ArchiSteamFarm
|
2022-06-16 17:23:12 +00:00
|
|
|
updateScript = ./update.sh;
|
2022-01-13 20:06:32 +00:00
|
|
|
ui = callPackage ./web-ui { };
|
|
|
|
};
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-05-29 06:06: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-11-16 04:20:00 +00:00
|
|
|
mainProgram = "ArchiSteamFarm";
|
2024-02-29 20:09:43 +00:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
}
|