ninjabrain bot
This commit is contained in:
parent
8471a8a809
commit
319347a30a
|
@ -128,6 +128,7 @@
|
|||
protonmail-desktop = import ./pkgs/protonmail-desktop.nix { inherit pkgs; };
|
||||
eyezoom = import ./pkgs/eyezoom.nix { inherit pkgs; };
|
||||
graalvm = import ./pkgs/graalvm.nix { inherit pkgs; };
|
||||
ninjabrain = import ./pkgs/ninjabrain.nix { inherit pkgs; };
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
|
@ -86,5 +86,6 @@
|
|||
++ (if config.mcsr then [
|
||||
pkgs.prismlauncher
|
||||
extra.graalvm
|
||||
extra.ninjabrain
|
||||
] else []);
|
||||
}
|
||||
|
|
30
pkgs/ninjabrain.nix
Normal file
30
pkgs/ninjabrain.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ pkgs, ... }:
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "ninjabrain";
|
||||
src = builtins.fetchurl {
|
||||
url = "https://github.com/Ninjabrain1/Ninjabrain-Bot/releases/download/1.5.1/Ninjabrain-Bot-1.5.1.jar";
|
||||
sha256 = "sha256:1p5dbjj23kr01w4arcd8p7cc44prdxj24m5hgjyvwki2c41vs6s7";
|
||||
};
|
||||
phases = [ "installPhase" ];
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/lib
|
||||
cp $src $out/lib/ninbrain.jar
|
||||
cat > $out/bin/ninjabrain <<EOF
|
||||
#!/bin/sh
|
||||
export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath [
|
||||
pkgs.xorg.libX11
|
||||
pkgs.xorg.libXtst
|
||||
pkgs.xorg.libXt
|
||||
pkgs.libxkbcommon
|
||||
pkgs.xorg.libxcb
|
||||
pkgs.xorg.libXinerama
|
||||
pkgs.fontconfig
|
||||
pkgs.xorg.libXft
|
||||
]}"
|
||||
java -jar $out/lib/ninbrain.jar &
|
||||
disown
|
||||
EOF
|
||||
chmod +x $out/bin/ninjabrain
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user