am2rlauncher: init at 2.3.0

This commit is contained in:
Noah Snelson 2023-09-03 17:03:22 -07:00
parent 7c19f30a07
commit 17cd479aee
3 changed files with 161 additions and 0 deletions

View File

@ -0,0 +1,14 @@
diff --git a/AM2RLauncher/AM2RLauncherLib/Profile.cs b/AM2RLauncher/AM2RLauncherLib/Profile.cs
index 8186350..2f9de2a 100644
--- a/AM2RLauncher/AM2RLauncherLib/Profile.cs
+++ b/AM2RLauncher/AM2RLauncherLib/Profile.cs
@@ -796,7 +796,8 @@ public static class Profile
UseShellExecute = false,
WorkingDirectory = gameDirectory,
#if NOAPPIMAGE
- FileName = $"{gameDirectory}/runner"
+ FileName = "am2r-run",
+ Arguments = "./runner"
#else
FileName = $"{gameDirectory}/AM2R.AppImage"
#endif

43
pkgs/by-name/am/am2rlauncher/deps.nix generated Normal file
View File

@ -0,0 +1,43 @@
# This file was automatically generated by passthru.fetch-deps.
# Please dont edit it manually, your changes might get overwritten!
{ fetchNuGet }: [
(fetchNuGet { pname = "AtkSharp"; version = "3.24.24.34"; sha256 = "1jn1vgi9xm0jp7769k6sbdi8d273kigjrsh93i6s4c03hqxv7cqs"; })
(fetchNuGet { pname = "CairoSharp"; version = "3.24.24.34"; sha256 = "0pydn1k0cam1gclg9sc1sbnmbyzh28qlc5qanyxcylwghink3kgz"; })
(fetchNuGet { pname = "Eto.Forms"; version = "2.7.1"; sha256 = "1hzbdnmn5znycfi0mvqa5k5mz9gasy58qzwa7fjmlkwj8ab87l9r"; })
(fetchNuGet { pname = "Eto.Platform.Gtk"; version = "2.7.1"; sha256 = "09iz85s728jy5qg7y30qvqw5rpsr3yxffrchk1avryk87ky1ysys"; })
(fetchNuGet { pname = "GdkSharp"; version = "3.24.24.34"; sha256 = "0r0x0yib7chwsyrbpvicrfwldwqx5lyqq4p86zaxpmzd6zdaj0x5"; })
(fetchNuGet { pname = "GioSharp"; version = "3.24.24.34"; sha256 = "02hxvgjd4w9jpzbkk7qf9q9bkvyp5hfzwxfqp10vg5lpl9yl3xpx"; })
(fetchNuGet { pname = "GLibSharp"; version = "3.24.24.34"; sha256 = "0kvp033fgdwc8p2abfp5z9pzq66cvwbnjfvr4v4bkpy5s5h181kq"; })
(fetchNuGet { pname = "GtkSharp"; version = "3.24.24.34"; sha256 = "0028hzmmqyfx87qqmaf9cgb5psn7gkbmqvixcid67x1d6mzxjicb"; })
(fetchNuGet { pname = "LibGit2Sharp"; version = "0.27.0"; sha256 = "0n8crafpp4jq74km45wlm3jm0h96ggvqxy26wrz55azgjpk6p1gz"; })
(fetchNuGet { pname = "LibGit2Sharp.NativeBinaries"; version = "2.0.319"; sha256 = "0xm6np8y182v5246imnkw1fj2sx8x2nl3568kkm3razcgb0y5xlf"; })
(fetchNuGet { pname = "log4net"; version = "2.0.15"; sha256 = "1iq1rd0z0m15ln247jjrimj3avq50vh6njvw4x158r5v6nz093nb"; })
(fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.1.0"; sha256 = "08vh1r12g6ykjygq5d3vq09zylgb84l63k49jc4v8faw9g93iqqm"; })
(fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "5.0.0"; sha256 = "0mwpwdflidzgzfx2dlpkvvnkgkr2ayaf0s80737h4wa35gaj11rc"; })
(fetchNuGet { pname = "Microsoft.Win32.Registry"; version = "5.0.0"; sha256 = "102hvhq2gmlcbq8y2cb7hdr2dnmjzfp2k3asr1ycwrfacwyaak7n"; })
(fetchNuGet { pname = "Microsoft.Win32.SystemEvents"; version = "6.0.0"; sha256 = "0c6pcj088g1yd1vs529q3ybgsd2vjlk5y1ic6dkmbhvrp5jibl9p"; })
(fetchNuGet { pname = "NETStandard.Library"; version = "2.0.3"; sha256 = "1fn9fxppfcg4jgypp2pmrpr6awl3qz1xmnri0cygpkwvyx27df1y"; })
(fetchNuGet { pname = "PangoSharp"; version = "3.24.24.34"; sha256 = "1r0h14cklglfpv1lhv93cxmzi2w7d5s03gzpq3j5dmrz43flg9zw"; })
(fetchNuGet { pname = "System.Buffers"; version = "4.4.0"; sha256 = "183f8063w8zqn99pv0ni0nnwh7fgx46qzxamwnans55hhs2l0g19"; })
(fetchNuGet { pname = "System.Buffers"; version = "4.5.1"; sha256 = "04kb1mdrlcixj9zh1xdi5as0k0qi8byr5mi3p3jcxx72qz93s2y3"; })
(fetchNuGet { pname = "System.ComponentModel.Annotations"; version = "5.0.0"; sha256 = "021h7x98lblq9avm1bgpa4i31c2kgsa7zn4sqhxf39g087ar756j"; })
(fetchNuGet { pname = "System.Configuration.ConfigurationManager"; version = "4.5.0"; sha256 = "1frpy24mn6q7hgwayj98kkx89z861f5dmia4j6zc0a2ydgx8x02c"; })
(fetchNuGet { pname = "System.Configuration.ConfigurationManager"; version = "6.0.0"; sha256 = "0sqapr697jbb4ljkq46msg0xx1qpmc31ivva6llyz2wzq3mpmxbw"; })
(fetchNuGet { pname = "System.Drawing.Common"; version = "6.0.0"; sha256 = "02n8rzm58dac2np8b3xw8ychbvylja4nh6938l5k2fhyn40imlgz"; })
(fetchNuGet { pname = "System.Memory"; version = "4.5.0"; sha256 = "1layqpcx1q4l805fdnj2dfqp6ncx2z42ca06rgsr6ikq4jjgbv30"; })
(fetchNuGet { pname = "System.Memory"; version = "4.5.4"; sha256 = "14gbbs22mcxwggn0fcfs1b062521azb9fbb7c113x0mq6dzq9h6y"; })
(fetchNuGet { pname = "System.Numerics.Vectors"; version = "4.4.0"; sha256 = "0rdvma399070b0i46c4qq1h2yvjj3k013sqzkilz4bz5cwmx1rba"; })
(fetchNuGet { pname = "System.Runtime.CompilerServices.Unsafe"; version = "4.5.0"; sha256 = "17labczwqk3jng3kkky73m0jhi8wc21vbl7cz5c0hj2p1dswin43"; })
(fetchNuGet { pname = "System.Runtime.CompilerServices.Unsafe"; version = "4.5.3"; sha256 = "1afi6s2r1mh1kygbjmfba6l4f87pi5sg13p4a48idqafli94qxln"; })
(fetchNuGet { pname = "System.Security.AccessControl"; version = "4.5.0"; sha256 = "1wvwanz33fzzbnd2jalar0p0z3x0ba53vzx1kazlskp7pwyhlnq0"; })
(fetchNuGet { pname = "System.Security.AccessControl"; version = "5.0.0"; sha256 = "17n3lrrl6vahkqmhlpn3w20afgz09n7i6rv0r3qypngwi7wqdr5r"; })
(fetchNuGet { pname = "System.Security.AccessControl"; version = "6.0.0"; sha256 = "0a678bzj8yxxiffyzy60z2w1nczzpi8v97igr4ip3byd2q89dv58"; })
(fetchNuGet { pname = "System.Security.Cryptography.ProtectedData"; version = "4.5.0"; sha256 = "11qlc8q6b7xlspayv07718ibzvlj6ddqqxkvcbxv5b24d5kzbrb7"; })
(fetchNuGet { pname = "System.Security.Cryptography.ProtectedData"; version = "6.0.0"; sha256 = "05kd3a8w7658hjxq9vvszxip30a479fjmfq4bq1r95nrsvs4hbss"; })
(fetchNuGet { pname = "System.Security.Permissions"; version = "4.5.0"; sha256 = "192ww5rm3c9mirxgl1nzyrwd18am3izqls0hzm0fvcdjl5grvbhm"; })
(fetchNuGet { pname = "System.Security.Permissions"; version = "6.0.0"; sha256 = "0jsl4xdrkqi11iwmisi1r2f2qn5pbvl79mzq877gndw6ans2zhzw"; })
(fetchNuGet { pname = "System.Security.Principal.Windows"; version = "4.5.0"; sha256 = "0rmj89wsl5yzwh0kqjgx45vzf694v9p92r4x4q6yxldk1cv1hi86"; })
(fetchNuGet { pname = "System.Security.Principal.Windows"; version = "5.0.0"; sha256 = "1mpk7xj76lxgz97a5yg93wi8lj0l8p157a5d50mmjy3gbz1904q8"; })
(fetchNuGet { pname = "System.Windows.Extensions"; version = "6.0.0"; sha256 = "1wy9pq9vn1bqg5qnv53iqrbx04yzdmjw4x5yyi09y3459vaa1sip"; })
]

View File

@ -0,0 +1,104 @@
{ lib
, buildDotnetModule
, writeShellScript
, glibc
, gtk3
, libappindicator
, webkitgtk
, e2fsprogs
, libnotify
, libgit2
, openssl
, xdelta
, file
, busybox
, openjdk
, patchelf
, fetchFromGitHub
, buildFHSEnv
, glib-networking
}:
let
am2r-run = buildFHSEnv {
name = "am2r-run";
multiArch = true;
multiPkgs = pkgs: with pkgs; [
stdenv.cc.cc.lib
xorg.libX11
xorg.libXext
xorg.libXrandr
xorg.libXxf86vm
curl
libGLU
libglvnd
openal
zlib
];
runScript = writeShellScript "am2r-run" ''
exec -- "$1" "$@"
'';
};
in
buildDotnetModule {
pname = "am2rlauncher";
version = "2.3.0-unstable-2023-11-08";
src = fetchFromGitHub {
owner = "AM2R-Community-Developers";
repo = "AM2RLauncher";
rev = "5d8b7d9b3de68e6215c10b9fd223b7f1d5e40dea";
sha256 = "sha256-/nHqo8jh3sOUngbpqdfiQjUWO/8Uzpc5jtW7Ep4q6Wg=";
};
projectFile = "AM2RLauncher/AM2RLauncher.Gtk/AM2RLauncher.Gtk.csproj";
nugetDeps = ./deps.nix;
executables = "AM2RLauncher.Gtk";
runtimeDeps = [
glibc
gtk3
libappindicator
webkitgtk
e2fsprogs
libnotify
libgit2
openssl
];
buildInputs = [ gtk3 ];
patches = [ ./am2r-run-binary.patch ];
dotnetFlags = [ ''-p:DefineConstants="NOAPPIMAGE;NOAUTOUPDATE;PATCHOPENSSL"'' ];
postFixup = ''
wrapProgram $out/bin/AM2RLauncher.Gtk \
--prefix PATH : ${lib.makeBinPath [ am2r-run xdelta file openjdk patchelf ]} \
--prefix GIO_EXTRA_MODULES : ${glib-networking}/lib/gio/modules
mkdir -p $out/share/icons
install -Dm644 $src/AM2RLauncher/distribution/linux/AM2RLauncher.png $out/share/icons/AM2RLauncher.png
install -Dm644 $src/AM2RLauncher/distribution/linux/AM2RLauncher.desktop $out/share/applications/AM2RLauncher.desktop
# renames binary for desktop file
mv $out/bin/AM2RLauncher.Gtk $out/bin/AM2RLauncher
'';
meta = with lib; {
homepage = "https://github.com/AM2R-Community-Developers/AM2RLauncher";
description = "A front-end for dealing with AM2R updates and mods";
longDescription = ''
A front-end application that simplifies installing the latest
AM2R-Community-Updates, creating APKs for Android use, as well as Mods for
AM2R.
'';
license = licenses.gpl3Only;
maintainers = with maintainers; [ nsnelson ];
mainProgram = "AM2RLauncher";
platforms = platforms.linux;
};
}