From 319347a30afdeb736379ea7c1edce2c6170dc2a4 Mon Sep 17 00:00:00 2001 From: depsterr Date: Mon, 6 Jan 2025 22:54:44 +0100 Subject: [PATCH] ninjabrain bot --- flake.nix | 1 + home-manager/applications.nix | 1 + pkgs/ninjabrain.nix | 30 ++++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 pkgs/ninjabrain.nix diff --git a/flake.nix b/flake.nix index 22edf8c..ec0d0e3 100644 --- a/flake.nix +++ b/flake.nix @@ -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; }; }; }); } diff --git a/home-manager/applications.nix b/home-manager/applications.nix index e4ee3a6..77fc2c8 100644 --- a/home-manager/applications.nix +++ b/home-manager/applications.nix @@ -86,5 +86,6 @@ ++ (if config.mcsr then [ pkgs.prismlauncher extra.graalvm + extra.ninjabrain ] else []); } diff --git a/pkgs/ninjabrain.nix b/pkgs/ninjabrain.nix new file mode 100644 index 0000000..1ea06ee --- /dev/null +++ b/pkgs/ninjabrain.nix @@ -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 <