From fbfa6449f01cd4bb6e028ebf90d2e75abfd79842 Mon Sep 17 00:00:00 2001 From: gnidorah Date: Mon, 15 Jun 2020 20:29:02 +0300 Subject: [PATCH] ArchiSteamFarm: 4.2.0.6 -> 4.2.2.1 (#90219) --- .../misc/ArchiSteamFarm/default.nix | 38 +++++++------------ 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/pkgs/applications/misc/ArchiSteamFarm/default.nix b/pkgs/applications/misc/ArchiSteamFarm/default.nix index c165003d8f8..6201d881a88 100644 --- a/pkgs/applications/misc/ArchiSteamFarm/default.nix +++ b/pkgs/applications/misc/ArchiSteamFarm/default.nix @@ -1,27 +1,15 @@ -{ stdenv, fetchurl, unzip, makeWrapper, autoPatchelfHook -, zlib, lttng-ust, curl, icu, openssl }: +{ stdenv, fetchurl, unzip, makeWrapper, dotnetCorePackages, jq }: stdenv.mkDerivation rec { pname = "ArchiSteamFarm"; - version = "4.2.0.6"; + version = "4.2.2.1"; - src = { - x86_64-linux = fetchurl { - url = "https://github.com/JustArchiNET/ArchiSteamFarm/releases/download/${version}/ASF-linux-x64.zip"; - sha256 = "05hx6q1lkbjbqhwi9xxvm7ycnsnpl1cnqzyy2yn0q4x27im399cn"; - }; - armv7l-linux = fetchurl { - url = "https://github.com/JustArchiNET/ArchiSteamFarm/releases/download/${version}/ASF-linux-arm.zip"; - sha256 = "0l8irqrpl5vbjj84k4makj2ph2z6kpny7qz51zrzbgwhrlw0w4vg"; - }; - aarch64-linux = fetchurl { - url = "https://github.com/JustArchiNET/ArchiSteamFarm/releases/download/${version}/ASF-linux-arm64.zip"; - sha256 = "0hg2g4i8sj3fxqfy4imz1iarby1d9f8dh59j266lbbdf2vfz2cml"; - }; - }.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}"); + src = fetchurl { + url = "https://github.com/JustArchiNET/ArchiSteamFarm/releases/download/${version}/ASF-generic.zip"; + sha256 = "0pr9rrhi44yl99c2i12rimmc4mhbh0ma9jn17cgsh8p0kbj8sq94"; + }; - nativeBuildInputs = [ unzip makeWrapper autoPatchelfHook ]; - buildInputs = [ stdenv.cc.cc zlib lttng-ust curl ]; + nativeBuildInputs = [ unzip makeWrapper jq ]; sourceRoot = "."; @@ -29,23 +17,25 @@ stdenv.mkDerivation rec { dist=$out/opt/asf mkdir -p $dist cp -r * $dist - chmod +x $dist/ArchiSteamFarm - makeWrapper $dist/ArchiSteamFarm $out/bin/ArchiSteamFarm \ - --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ icu openssl ] }" \ + + jq "del(.runtimeOptions.framework.version)" ArchiSteamFarm.runtimeconfig.json > $dist/ArchiSteamFarm.runtimeconfig.json + + makeWrapper ${dotnetCorePackages.aspnetcore_3_1}/bin/dotnet $out/bin/ArchiSteamFarm \ + --add-flags $dist/ArchiSteamFarm.dll \ --add-flags "--path ~/.config/asf" \ --run "mkdir -p ~/.config/asf" \ --run "cd ~/.config/asf" \ --run "[ -d config ] || cp --no-preserve=mode -r $dist/config ." \ --run "[ -d logs ] || cp --no-preserve=mode -r $dist/logs ." \ --run "[ -d plugins ] || cp --no-preserve=mode -r $dist/plugins ." \ - --run "[ -d www ] || cp --no-preserve=mode -r $dist/www ." \ + --run "[ -d www ] || ln -sf $dist/www ." ''; meta = with stdenv.lib; { description = "Application with primary purpose of idling Steam cards from multiple accounts simultaneously"; homepage = "https://github.com/JustArchiNET/ArchiSteamFarm"; license = licenses.asl20; - platforms = [ "x86_64-linux" "armv7l-linux" "aarch64-linux" ]; + platforms = dotnetCorePackages.aspnetcore_3_1.meta.platforms; maintainers = with maintainers; [ gnidorah ]; hydraPlatforms = []; };