diff options
author | Sandro Jäckel | 2022-12-30 17:36:18 +0100 |
---|---|---|
committer | Sandro Jäckel | 2022-12-30 17:36:18 +0100 |
commit | d0b531b5743f60cfeae75d55b1dffd62e97c0714 (patch) | |
tree | 917d5926be8bc26d0ed6c672ee2b6d581547a93e | |
parent | a8ce53810a43b1bf26d027f92e730dc4358250d4 (diff) |
ArchiSteamFarm: build asf as single file, build plugins
-rw-r--r-- | pkgs/applications/misc/ArchiSteamFarm/default.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/pkgs/applications/misc/ArchiSteamFarm/default.nix b/pkgs/applications/misc/ArchiSteamFarm/default.nix index 7896604b0e9a..5704dbcb1d1c 100644 --- a/pkgs/applications/misc/ArchiSteamFarm/default.nix +++ b/pkgs/applications/misc/ArchiSteamFarm/default.nix @@ -1,4 +1,5 @@ { lib +, stdenv , buildDotnetModule , fetchFromGitHub , dotnetCorePackages @@ -27,11 +28,20 @@ buildDotnetModule rec { projectFile = "ArchiSteamFarm.sln"; executables = [ "ArchiSteamFarm" ]; + dotnetFlags = [ + "-p:PublishSingleFile=true" + "-p:PublishTrimmed=true" + ]; + 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+=( @@ -40,6 +50,15 @@ buildDotnetModule rec { ) ''; + postInstall = '' + buildPlugin() { + dotnet publish $1 -p:ContinuousIntegrationBuild=true -p:Deterministic=true \ + --output $out/lib/${pname}/plugins/$1 --configuration Release \ + -p:TargetLatestRuntimePatch=false -p:UseAppHost=false --no-restore + } + buildPlugin ArchiSteamFarm.OfficialPlugins.SteamTokenDumper + ''; + passthru = { updateScript = ./update.sh; ui = callPackage ./web-ui { }; |