From 8138e69f7f379ac3c8fca11014161f09b27d5cda Mon Sep 17 00:00:00 2001 From: nartsisss Date: Thu, 9 Jan 2025 03:38:50 +0300 Subject: [PATCH] arnis: init at 2.6.0 --- pkgs/by-name/ar/arnis/package.nix | 75 +++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 pkgs/by-name/ar/arnis/package.nix diff --git a/pkgs/by-name/ar/arnis/package.nix b/pkgs/by-name/ar/arnis/package.nix new file mode 100644 index 000000000000..2ad0ce398089 --- /dev/null +++ b/pkgs/by-name/ar/arnis/package.nix @@ -0,0 +1,75 @@ +{ + lib, + stdenv, + rustPlatform, + fetchFromGitHub, + cargo-tauri, + wrapGAppsHook4, + webkitgtk_4_1, + pkg-config, + versionCheckHook, + nix-update-script, +}: +rustPlatform.buildRustPackage (finalAttrs: { + pname = "arnis"; + version = "2.6.0"; + + src = fetchFromGitHub { + owner = "louis-e"; + repo = "arnis"; + tag = "v${finalAttrs.version}"; + hash = "sha256-FO/8cQkw6CZWMjWgjx0/2KbfnYgIbHHWdgc4c5t4AEk="; + }; + + cargoHash = "sha256-R7dW2/7UInK3yLz5YHb6UYhLukPrv8NZ8lRYhQwsiMw="; + + nativeBuildInputs = [ + cargo-tauri.hook + + pkg-config + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + wrapGAppsHook4 + ]; + + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ + webkitgtk_4_1 + ]; + + checkFlags = [ + # Fail to run in sandbox environment + "--skip=map_transformation::translate::translator::tests::test_translate_by_vector" + ]; + + nativeInstallCheckInputs = [ + versionCheckHook + ]; + versionCheckProgram = + let + binSubdirectory = + if stdenv.hostPlatform.isLinux then + "bin" + else if stdenv.hostPlatform.isDarwin then + "Applications/Arnis.app/Contents/MacOS" + else + throw "Unsuported system"; + in + "${placeholder "out"}/${binSubdirectory}/arnis"; + doInstallCheck = true; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Real world location generator for Minecraft Java Edition"; + longDescription = '' + Open source project written in Rust generates any chosen location from + the real world in Minecraft Java Edition with a high level of detail. + ''; + homepage = "https://github.com/louis-e/arnis"; + changelog = "https://github.com/louis-e/arnis/releases/tag/${finalAttrs.src.tag}"; + license = lib.licenses.asl20; + inherit (cargo-tauri.hook.meta) platforms; + maintainers = with lib.maintainers; [ nartsiss ]; + mainProgram = "arnis"; + }; +})