removed IFD's

made t-rex slightly less scuffed

deleted afk-cmds
This commit is contained in:
Gerg-L 2023-07-03 15:31:07 -04:00
parent 04522f424d
commit 8d1ac4c573
7 changed files with 80 additions and 147 deletions

View file

@ -1,28 +1,18 @@
{
stdenv,
writeShellScriptBin,
fetchzip,
glibc,
}: let
wrapper = ''
#!/bin/sh
export LD_LIBRARY_PATH=${stdenv.cc.cc.lib}/lib/:${glibc}/lib/:/run/opengl-driver/lib/
exec ${glibc}/lib64/ld-linux-x86-64.so.2 \
$out/t-rex --no-watchdog \$@
'';
src = fetchzip {
url = "https://github.com/trexminer/T-Rex/releases/download/0.26.8/t-rex-0.26.8-linux.tar.gz";
sha256 = "sha256-qM/YIMqcntVYD8zJGCORQgIn1h4J4CDobyXwcdK3li8=";
stripRoot = false;
};
in
stdenv.mkDerivation (finalAttrs: {
version = "0.26.5";
pname = "t-rex-miner";
src = fetchzip {
url = "https://github.com/trexminer/T-Rex/releases/download/${finalAttrs.version}/t-rex-${finalAttrs.version}-linux.tar.gz";
sha256 = "sha256-eGOTfb03R2ck/6GMY6tPmTifYT9aVv3dNDQ5jRVlz58=";
stripRoot = false;
};
installPhase = ''
install -Dm555 $src/t-rex $out/t-rex
mkdir -p $out/bin
touch $out/bin/t-rex
echo "${wrapper}" > $out/bin/t-rex
chmod +x $out/bin/t-rex
'';
})
writeShellScriptBin "t-rex"
''
LD_LIBRARY_PATH=${stdenv.cc.cc.lib}/lib/:${glibc}/lib/:/run/opengl-driver/lib/
exec ${glibc}/lib64/ld-linux-x86-64.so.2 \
${src}/t-rex --no-watchdog "$@"
''