From 3847a2a8595bba68214ac4b7e3da3fc00776989b Mon Sep 17 00:00:00 2001 From: Ivar <41924494+IvarWithoutBones@users.noreply.github.com> Date: Wed, 26 May 2021 15:44:44 +0200 Subject: [PATCH] amidst: init at 4.6 (#124213) --- pkgs/tools/games/amidst/default.nix | 34 +++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/tools/games/amidst/default.nix diff --git a/pkgs/tools/games/amidst/default.nix b/pkgs/tools/games/amidst/default.nix new file mode 100644 index 000000000000..886ba3752a0b --- /dev/null +++ b/pkgs/tools/games/amidst/default.nix @@ -0,0 +1,34 @@ +{ lib +, stdenv +, fetchurl +, makeWrapper +, jre8 }: # TODO: Update this to the latest version of java upon the next release. This is currently not done because of https://github.com/toolbox4minecraft/amidst/issues/960 + +stdenv.mkDerivation rec { + pname = "amidst"; + version = "4.6"; + + src = fetchurl { # TODO: Compile from src + url = "https://github.com/toolbox4minecraft/amidst/releases/download/v${version}/amidst-v${lib.replaceStrings [ "." ] [ "-" ] version}.jar"; + sha256 = "0nz6xfhshy36j8k81kqdfbbxih96l7f3s9156f9lmw0mi1qlyzqk"; + }; + + dontUnpack = true; + + nativeBuildInputs = [ jre8 makeWrapper ]; + + installPhase = '' + mkdir -p $out/{bin,lib/amidst} + cp $src $out/lib/amidst/amidst.jar + makeWrapper ${jre8}/bin/java $out/bin/amidst \ + --add-flags "-jar $out/lib/amidst/amidst.jar" + ''; + + meta = with lib; { + homepage = "https://github.com/toolbox4minecraft/amidst"; + description = "Advanced Minecraft Interface and Data/Structure Tracking"; + license = licenses.gpl3Only; + maintainers = [ maintainers.ivar ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 86eac79854be..da2f735c3937 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -850,6 +850,8 @@ in auditwheel = callPackage ../tools/package-management/auditwheel { }; + amidst = callPackage ../tools/games/amidst { }; + gobgp = callPackage ../tools/networking/gobgp { }; metapixel = callPackage ../tools/graphics/metapixel { };