nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 95 lines 2.6 kB view raw
1{ 2 lib, 3 buildDotnetModule, 4 fetchFromGitHub, 5 dotnetCorePackages, 6 libkrb5, 7 zlib, 8 openssl, 9 callPackage, 10}: 11 12buildDotnetModule rec { 13 pname = "ArchiSteamFarm"; 14 # nixpkgs-update: no auto update 15 version = "6.1.7.8"; 16 17 src = fetchFromGitHub { 18 owner = "JustArchiNET"; 19 repo = "ArchiSteamFarm"; 20 rev = version; 21 hash = "sha256-bdjkYrfaC/5rKqRmKr+NVmCMU871WJFNRdh92i8GJF8="; 22 }; 23 24 dotnet-runtime = dotnetCorePackages.aspnetcore_9_0; 25 dotnet-sdk = dotnetCorePackages.sdk_9_0; 26 27 nugetDeps = ./deps.json; 28 29 projectFile = "ArchiSteamFarm.sln"; 30 executable = "ArchiSteamFarm"; 31 32 enableParallelBuilding = false; 33 34 useAppHost = false; 35 dotnetFlags = [ 36 # useAppHost doesn't explicitly disable this 37 "-p:UseAppHost=false" 38 "-p:RuntimeIdentifiers=" 39 ]; 40 dotnetBuildFlags = [ 41 "--framework=net9.0" 42 ]; 43 dotnetInstallFlags = dotnetBuildFlags; 44 45 runtimeDeps = [ 46 libkrb5 47 zlib 48 openssl 49 ]; 50 51 doCheck = true; 52 53 preInstall = '' 54 dotnetProjectFiles=(ArchiSteamFarm) 55 56 # A mutable path, with this directory tree must be set. By default, this would point at the nix store causing errors. 57 makeWrapperArgs+=( 58 --run 'mkdir -p ~/.config/archisteamfarm/{config,logs,plugins}' 59 --set "ASF_PATH" "~/.config/archisteamfarm" 60 ) 61 ''; 62 63 postInstall = '' 64 buildPlugin() { 65 echo "Publishing plugin $1" 66 dotnet publish $1 -p:ContinuousIntegrationBuild=true -p:Deterministic=true \ 67 --output $out/lib/ArchiSteamFarm/plugins/$1 --configuration Release \ 68 $dotnetFlags $dotnetInstallFlags 69 } 70 71 buildPlugin ArchiSteamFarm.OfficialPlugins.ItemsMatcher 72 buildPlugin ArchiSteamFarm.OfficialPlugins.MobileAuthenticator 73 buildPlugin ArchiSteamFarm.OfficialPlugins.Monitoring 74 buildPlugin ArchiSteamFarm.OfficialPlugins.SteamTokenDumper 75 76 chmod +x $out/lib/ArchiSteamFarm/ArchiSteamFarm.dll 77 wrapDotnetProgram $out/lib/ArchiSteamFarm/ArchiSteamFarm.dll $out/bin/ArchiSteamFarm 78 substituteInPlace $out/bin/ArchiSteamFarm \ 79 --replace-fail "exec " "exec dotnet " 80 ''; 81 82 passthru = { 83 # nix-shell maintainers/scripts/update.nix --argstr package ArchiSteamFarm 84 updateScript = ./update.sh; 85 ui = callPackage ./web-ui { }; 86 }; 87 88 meta = with lib; { 89 description = "Application with primary purpose of idling Steam cards from multiple accounts simultaneously"; 90 homepage = "https://github.com/JustArchiNET/ArchiSteamFarm"; 91 license = licenses.asl20; 92 mainProgram = "ArchiSteamFarm"; 93 maintainers = with maintainers; [ SuperSandro2000 ]; 94 }; 95}