From 9d712bafa1870c3221d01fea5fc2c6be2f1609ec Mon Sep 17 00:00:00 2001 From: Ross Smyth <18294397+RossSmyth@users.noreply.github.com> Date: Mon, 23 Jun 2025 12:54:10 -0400 Subject: [PATCH] isle-portable: init at 0-unstable-2025-07-25 --- pkgs/by-name/is/isle-portable/package.nix | 105 ++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 pkgs/by-name/is/isle-portable/package.nix diff --git a/pkgs/by-name/is/isle-portable/package.nix b/pkgs/by-name/is/isle-portable/package.nix new file mode 100644 index 000000000000..51ae8c09c832 --- /dev/null +++ b/pkgs/by-name/is/isle-portable/package.nix @@ -0,0 +1,105 @@ +{ + lib, + fetchFromGitHub, + stdenv, + unstableGitUpdater, + + # Native Build Inputs + cmake, + python3, + pkg-config, + + # Build Inputs + xorg, + wayland, + libxkbcommon, + wayland-protocols, + glew, + qt6, + mesa, + alsa-lib, + sdl3, + iniparser, + + # Options + imguiDebug ? false, + addrSan ? false, + emscriptenHost ? "", +}: +stdenv.mkDerivation (finalAttrs: { + strictDeps = true; + name = "isle-portable"; + version = "0-unstable-2025-07-25"; + + src = fetchFromGitHub { + owner = "isledecomp"; + repo = "isle-portable"; + rev = "89f2f5cefee1a107330bbf93048f7da73f5754f7"; + hash = "sha256-h+IkzDSZjt8Kcjb5RMOjCCJh9a0gkMBAYXzIYMv6mZM="; + fetchSubmodules = true; + }; + + postPatch = lib.optionalString stdenv.isDarwin '' + substituteInPlace packaging/macos/CMakeLists.txt \ + --replace-fail "fixup_bundle" "#fixup_bundle" + ''; + + outputs = [ + "out" + "lib" + ]; + + nativeBuildInputs = [ + cmake + qt6.wrapQtAppsHook + python3 + pkg-config + ]; + + buildInputs = [ + qt6.qtbase + sdl3 + iniparser + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + xorg.libX11 + xorg.libXext + xorg.libXrandr + xorg.libXrender + xorg.libXfixes + xorg.libXi + xorg.libXinerama + xorg.libXcursor + wayland + libxkbcommon + wayland-protocols + glew + mesa + alsa-lib + ]; + + cmakeFlags = [ + (lib.cmakeBool "DOWNLOAD_DEPENDENCIES" false) + (lib.cmakeBool "ISLE_DEBUG" imguiDebug) + (lib.cmakeFeature "ISLE_EMSCRIPTEN_HOST" emscriptenHost) + ]; + + passthru.updateScript = unstableGitUpdater { hardcodeZeroVersion = true; }; + + meta = { + description = "Portable decompilation of Lego Island"; + homepage = "https://github.com/isledecomp/isle-portable"; + license = with lib.licenses; [ + # The original code for the portable project + lgpl3Plus + # The decompilation code + mit + unfree + ]; + platforms = with lib.platforms; windows ++ linux ++ darwin; + mainProgram = "isle"; + maintainers = with lib.maintainers; [ + RossSmyth + ]; + }; +})