nixpkgs/pkgs/applications/misc/ArchiSteamFarm/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

82 lines
2.1 KiB
Nix
Raw Normal View History

{ lib
, buildDotnetModule
, fetchFromGitHub
, dotnetCorePackages
, libkrb5
, zlib
, openssl
, callPackage
}:
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
2023-12-04 20:59:49 +00:00
version = "5.5.0.11";
src = fetchFromGitHub {
2023-06-26 18:45:43 +00:00
owner = "JustArchiNET";
repo = "ArchiSteamFarm";
rev = version;
2023-12-04 20:59:49 +00:00
hash = "sha256-VlJiTCdoH6hlVtQgECIlbsQvg3S58B5IIy1zRxh1eOg=";
};
2023-12-04 20:59:49 +00:00
dotnet-runtime = dotnetCorePackages.aspnetcore_8_0;
dotnet-sdk = dotnetCorePackages.sdk_8_0;
nugetDeps = ./deps.nix;
projectFile = "ArchiSteamFarm.sln";
executables = [ "ArchiSteamFarm" ];
dotnetFlags = [
"-p:PublishSingleFile=true"
"-p:PublishTrimmed=true"
];
dotnetInstallFlags = [
2023-12-04 20:59:49 +00:00
"--framework=net8.0"
];
selfContainedBuild = true;
runtimeDeps = [ libkrb5 zlib openssl ];
doCheck = true;
preBuild = ''
export projectFile=(ArchiSteamFarm)
'';
preInstall = ''
# A mutable path, with this directory tree must be set. By default, this would point at the nix store causing errors.
makeWrapperArgs+=(
--run 'mkdir -p ~/.config/archisteamfarm/{config,logs,plugins}'
--set "ASF_PATH" "~/.config/archisteamfarm"
)
'';
postInstall = ''
buildPlugin() {
echo "Publishing plugin $1"
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 \
2023-12-04 20:59:49 +00:00
-p:TargetLatestRuntimePatch=false -p:UseAppHost=false
}
2023-01-17 01:05:24 +00:00
buildPlugin ArchiSteamFarm.OfficialPlugins.ItemsMatcher
2023-03-09 00:41:12 +00:00
buildPlugin ArchiSteamFarm.OfficialPlugins.MobileAuthenticator
buildPlugin ArchiSteamFarm.OfficialPlugins.SteamTokenDumper
'';
passthru = {
# nix-shell maintainers/scripts/update.nix --argstr package ArchiSteamFarm
2022-06-06 00:13:56 +00:00
updateScript = ./update.sh;
ui = callPackage ./web-ui { };
};
meta = with lib; {
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";
maintainers = with maintainers; [ SuperSandro2000 lom ];
};
}