-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added new Game pkg for War Thunder, an MMO tank/plane/warship simulator with a native linux client. #372991
Open
Mephist0phel3s
wants to merge
96
commits into
NixOS:nixos-24.11
Choose a base branch
from
Mephist0phel3s:demon
base: nixos-24.11
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Added new Game pkg for War Thunder, an MMO tank/plane/warship simulator with a native linux client. #372991
Changes from 89 commits
Commits
Show all changes
96 commits
Select commit
Hold shift + click to select a range
5dd90dd
Fixing branch bullshit, re-adding again
Mephist0phel3s fc428e3
Added war thunder to call packages
Mephist0phel3s ccc6968
Fuck
Mephist0phel3s c957523
f
Mephist0phel3s 74d2f02
.
Mephist0phel3s de9bb6f
.
Mephist0phel3s 5c55852
blah
Mephist0phel3s 86d7ee1
.
Mephist0phel3s 4d7b2a6
Changed to x86_64 script
Mephist0phel3s 1a61d4a
.
Mephist0phel3s b1de644
.....
Mephist0phel3s 33e1552
fucking fu
Mephist0phel3s 005de4a
Fixed shit, wrapper and drv builds
Mephist0phel3s dafa268
Fixed a bunch more shit
Mephist0phel3s cf08bee
m
Mephist0phel3s 206a6a3
s
Mephist0phel3s 8c74772
s
Mephist0phel3s e129517
trying new shit
Mephist0phel3s 6dbcc7b
s
Mephist0phel3s 8751014
s
Mephist0phel3s fe97cf7
s
Mephist0phel3s ca4d670
s
Mephist0phel3s e41b90d
s
Mephist0phel3s 9a3e78d
s
Mephist0phel3s 99a9a68
s
Mephist0phel3s f9cee73
more fixes
Mephist0phel3s f219205
s
Mephist0phel3s 405db05
IT FUCKIN WORKKKKKKSSSSS
Mephist0phel3s c70a40a
c
Mephist0phel3s b500de9
a
Mephist0phel3s d8c9dac
s
Mephist0phel3s f1b2e7d
s
Mephist0phel3s 590b888
s
Mephist0phel3s ec0cb20
s
Mephist0phel3s dc5e2d9
s
Mephist0phel3s 4a51927
s
Mephist0phel3s 986a77d
s
Mephist0phel3s 62a2e3e
s
Mephist0phel3s 9d79249
s
Mephist0phel3s 83fe7b0
s
Mephist0phel3s 3da1ed1
s
Mephist0phel3s 791f9f7
s
Mephist0phel3s 4c63cbc
x
Mephist0phel3s 66ee23e
x
Mephist0phel3s b0085e1
s
Mephist0phel3s 1173f13
s
Mephist0phel3s 910c9d1
s
Mephist0phel3s c2afb2c
s
Mephist0phel3s c9dae7c
s
Mephist0phel3s 1443c61
s
Mephist0phel3s 6f89f5a
s
Mephist0phel3s da0a870
s
Mephist0phel3s 74378d3
s
Mephist0phel3s fa31753
s
Mephist0phel3s aae03e3
s
Mephist0phel3s ad3285c
s
Mephist0phel3s 1466af1
s
Mephist0phel3s adc5fb5
s
Mephist0phel3s 89e378a
s
Mephist0phel3s 67f1bff
s
Mephist0phel3s 46d921b
s
Mephist0phel3s b3c7dfe
S
Mephist0phel3s e68ed87
S
Mephist0phel3s c03d951
s
Mephist0phel3s a87983e
Removed line, testing something
Mephist0phel3s ba2e3a6
s
Mephist0phel3s 3701947
s
Mephist0phel3s 7521655
typos are bullshit
Mephist0phel3s f021963
s
Mephist0phel3s 44df1ea
s
Mephist0phel3s 0b7cf62
s
Mephist0phel3s 096d92a
s
Mephist0phel3s c640dde
s
Mephist0phel3s 8a928ed
trying new let in statement to solve the
Mephist0phel3s 377ec7d
typos fuckin fuck
Mephist0phel3s a5c4692
s
Mephist0phel3s d59f212
refactored some shit to try a different method
Mephist0phel3s d013780
s
Mephist0phel3s ea96a4e
s
Mephist0phel3s c0fa14a
Added debug shit and more libraries to runtime env for wrapper. Launc…
Mephist0phel3s 722f50a
x
Mephist0phel3s 76d1312
s
Mephist0phel3s 86ea97b
fixed syntax bullshit
Mephist0phel3s 190f271
syntax
Mephist0phel3s 019dfb9
Added alsa and jack2 as runtime deps and lib paths for wrapper.
Mephist0phel3s 7c1a4a3
fucking syntax
Mephist0phel3s afa0db5
s
Mephist0phel3s ca45b90
added maintainer shit
Mephist0phel3s 60f3678
more maintainer shit
Mephist0phel3s 305d4c3
Added alsa and jack2 as runtime deps and lib paths for wrapper.
Mephist0phel3s 108a85b
added discord electron-wrapper to top-level all pkgs
Mephist0phel3s eae677d
s
Mephist0phel3s eb31df8
turned off copying out icon desktop file, moving function to makeDesk…
Mephist0phel3s c7d54fb
Added alsa and jack2 as runtime deps and lib paths for wrapper.
Mephist0phel3s 704c9b8
had to remove to get past erroring out, dont care about icon right no…
Mephist0phel3s 012573a
Added alsa and jack2 as runtime deps and lib paths for wrapper.
Mephist0phel3s File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
{ stdenv, lib, fetchurl, patchelf, makeWrapper, jack2, alsa-lib, writeShellApplication, makeDesktopItem, gtk3, glib, xorg, remarkable2-toolchain, bash, autoPatchelfHook, copyDesktopItems, vulkan-loader, libva, wayland }: | ||
|
||
let | ||
|
||
libPath = lib.makeLibraryPath [ autoPatchelfHook alsa-lib jack2 stdenv.cc.cc stdenv.cc.cc.lib remarkable2-toolchain glib gtk3 xorg.libX11 xorg.libXrandr vulkan-loader libva wayland ]; | ||
|
||
acesx86_64 = writeShellApplication { | ||
name = "acesx86_64"; | ||
runtimeInputs = [ bash wayland libva vulkan-loader alsa-lib jack2 ]; | ||
|
||
text = '' | ||
#!/bin/bash | ||
|
||
STORE_PATH=$(dirname "$(dirname "$(readlink -f "$(which launcher)")")") | ||
|
||
echo "$STORE_PATH" | ||
echo "DEBUG::: STORE_PATH = $STORE_PATH" | ||
echo "Check for home directory, create if not present." | ||
export ACES64_DIR=$HOME/.aces64/War-Thunder-086d99e/ | ||
echo "DEBUG::: Print LD env variables prior to setting them." | ||
echo "$LD_LIBRARY_PATH" | ||
echo "DEBUG::: Print libPath inherited by drv on realization." | ||
echo ${libPath} | ||
|
||
echo "DEBUG::: Setting libPath for runtime enviroment." | ||
export LD_LIBRARY_PATH="${libPath}:$LD_LIBRARY_PATH" | ||
echo "DEBUG::: Print libPath: $LD_LIBRARY_PATH" | ||
|
||
if [ ! -d "$HOME/.aces64/War-Thunder-086d99e" ]; then | ||
|
||
echo "DEBUG::: Directory not found. Fuck." | ||
|
||
mkdir -p "$HOME/.aces64/War-Thunder-086d99e" | ||
cd "$HOME/.aces64/War-Thunder-086d99e" | ||
|
||
echo "DEBUG::: Directory created and CD'ed." | ||
echo "DEBUG::: Setting Enviroment variables for runtime again." | ||
export ACES64_DIR=$HOME/.aces64/War-Thunder-086d99e/ | ||
else | ||
echo "DEBUG::: Directory exits, fucking good.." | ||
fi | ||
echo "Installing launcher, bpreport, and selfupdater scripts to the user directory" | ||
|
||
install -m755 -D \ | ||
"$STORE_PATH"/War-Thunder-086d99e/launcher "$ACES64_DIR/launcher" | ||
|
||
install -m755 -D \ | ||
"$STORE_PATH"/War-Thunder-086d99e/gaijin_selfupdater "$ACES64_DIR/gaijin_selfupdater" | ||
|
||
install -m755 -D \ | ||
"$STORE_PATH"/War-Thunder-086d99e/bpreport "$ACES64_DIR/bpreport" | ||
|
||
cp -f "$STORE_PATH"/War-Thunder-086d99e/ca-bundle.crt "$ACES64_DIR/ca-bundle.crt" | ||
cp -f "$STORE_PATH"/War-Thunder-086d99e/launcherr.dat "$ACES64_DIR/launcherr.dat" | ||
cp -f "$STORE_PATH"/War-Thunder-086d99e/libsciter-gtk.so "$ACES64_DIR/libsciter-gtk.so" | ||
cp -f "$STORE_PATH"/War-Thunder-086d99e/libsteam_api.so "$ACES64_DIR/libsteam_api.so" | ||
cp -f "$STORE_PATH"/War-Thunder-086d99e/package.blk "$ACES64_DIR/package.blk" | ||
cp -f "$STORE_PATH"/War-Thunder-086d99e/yupartner.blk "$ACES64_DIR/yupartner.blk" | ||
|
||
|
||
|
||
|
||
|
||
cd "$ACES64_DIR" || { echo "cd command rejected, breaking"; exit 1; } | ||
echo "DEBUG::: Changing root directory to $ACES64_DIR" | ||
echo "DEBUG::: Where the fuck am i. $PWD" | ||
|
||
exec "$ACES64_DIR/launcher" | ||
'';}; in | ||
stdenv.mkDerivation rec { | ||
name = "WarThunder"; | ||
pname = "War-Thunder"; | ||
version = "086d99e"; | ||
|
||
src = fetchurl { | ||
url = "https://github.com/Mephist0phel3s/War-Thunder/archive/refs/tags/086d99e.tar.gz"; | ||
hash = "sha256-vqpx85ZT1AzKk7dkZvMDMJf9GWalDM/F2JhaiMybMoY="; | ||
}; | ||
|
||
|
||
sourceRoot = "./${pname}-${version}"; | ||
unpackPhase = false; | ||
dontConfigure = true; | ||
dontBuild = true; | ||
nativeBuildInputs = [ copyDesktopItems ]; | ||
buildInputs = [ autoPatchelfHook stdenv.cc.cc stdenv.cc.cc.lib remarkable2-toolchain glib gtk3 xorg.libX11 xorg.libXrandr vulkan-loader libva wayland ]; | ||
|
||
# patchPhase = let | ||
|
||
|
||
|
||
|
||
|
||
installPhase = let | ||
|
||
desktopItem = makeDesktopItem { | ||
name = "WarThunder"; | ||
exec = "acesx86_64"; | ||
icon = "launcher"; | ||
desktopName = "War Thunder"; | ||
genericName = "War Thunder"; | ||
categories = [ "Game" ]; | ||
}; in '' | ||
runHook preInstall | ||
mkdir -p $out/${pname}-${version} | ||
mkdir -p $out/share/pixmaps | ||
mkdir -p $out/bin | ||
|
||
if [ -f "${acesx86_64}/bin/acesx86_64" ]; then | ||
install -m755 -D ${acesx86_64}/bin/acesx86_64 $out/bin/acesx86_64 | ||
else | ||
echo "FATAL ERROR DEBUG::: acesx86_64 script not found at ${acesx86_64}, breaking." | ||
exit 1 | ||
fi | ||
|
||
install -m755 -D launcher $out/${pname}-${version}/launcher | ||
install -m755 -D gaijin_selfupdater $out/${pname}-${version}/gaijin_selfupdater | ||
install -m755 -D bpreport $out/${pname}-${version}/bpreport | ||
|
||
cp ca-bundle.crt $out/${pname}-${version}/ca-bundle.crt | ||
cp launcherr.dat $out/${pname}-${version}/launcherr.dat | ||
cp libsciter-gtk.so $out/${pname}-${version}/libsciter-gtk.so | ||
cp libsteam_api.so $out/${pname}-${version}/libsteam_api.so | ||
cp package.blk $out/${pname}-${version}/package.blk | ||
cp yupartner.blk $out/${pname}-${version}/yupartner.blk | ||
|
||
echo "STORE_PATH=\"$out/${pname}-${version}\"" > $out/${pname}-${version}/store_path.txt | ||
|
||
echo "DEBUG::: Running patchelf to link binaries" | ||
patchelf \ | ||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ | ||
--set-rpath ${libPath} launcher | ||
patchelf \ | ||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ | ||
--set-rpath ${libPath} bpreport | ||
patchelf \ | ||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ | ||
--set-rpath ${libPath} gaijin_selfupdater | ||
echo "DEBUG::: Done, proceeding." | ||
|
||
install -m755 -D launcher.ico $out/share/pixmaps/launcher.png | ||
echo "DEBUG::: Installing the fucking desktop file" | ||
mkdir -p "$out/share/applications" | ||
echo "INFO: Skpipping cp -rf desktopItem" | ||
echo "INFO: sym linking aces to WarThunder for purposes of desktop execution." | ||
ln -s ${acesx86_64}/bin/acesx86_64 $out/bin/WarThunder | ||
|
||
echo "INFO: Installing bins to out/bin" | ||
install -m755 -D launcher $out/bin | ||
install -m755 -D gaijin_selfupdater "$out/bin" | ||
install -m755 -D bpreport "$out/bin" | ||
echo "INFO: Done" | ||
|
||
runHook postInstall | ||
''; | ||
|
||
|
||
meta = with lib; { | ||
homepage = "https://warthunder.com/"; | ||
description = "Military Vehicle PVP simulator, tanks, planes, warships. Report bugs with this nix pacakge as an issue on github @https://github.com/Mephist0phel3s/nixpkgs/issues"; | ||
platforms = platforms.linux; | ||
maintainers = with maintainers; [ Mephist0phel3s ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stuff like this is not acceptable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I totally forgot to fix these, i used them as markers mostly during silent fails. Ill fix.
"rebase / squash those commits into one"
Im not sure how to do that just yet as im new to contributing but i will figure it out and do that as well, and read the doc for contributing you provided and fix that as well.
Should i close this merge request and make a new one, or how should i approach?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, you don't need to close it. Rebasing / squashing is what you want to solve that - this allows you to fix everything in here.