diff --git a/pkgs/by-name/od/odin/package.nix b/pkgs/by-name/od/odin/package.nix index 2e4f6bdb0560..37c7e15c20ce 100644 --- a/pkgs/by-name/od/odin/package.nix +++ b/pkgs/by-name/od/odin/package.nix @@ -13,13 +13,13 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "odin"; - version = "dev-2026-05"; + version = "dev-2026-07"; src = fetchFromGitHub { owner = "odin-lang"; repo = "Odin"; tag = finalAttrs.version; - hash = "sha256-fgN6Lz1CnUPXrmnQr+sPEfwSF/7y0+eZBX6TKFcFA50="; + hash = "sha256-pVCZB6YOk73tBGVE1i73JJG3z9SZNakFuMp4Kepqnvc="; }; patches = [ @@ -39,7 +39,7 @@ stdenv.mkDerivation (finalAttrs: { substituteInPlace src/build_settings.cpp \ --replace-fail "arm64-apple-macosx" "arm64-apple-darwin" - rm -r vendor/raylib/{linux,macos,macos-arm64,wasm,windows} + rm -r vendor/raylib/{linux,macos,wasm,windows} patchShebangs --build build_odin.sh ''; diff --git a/pkgs/by-name/od/odin/system-raylib.patch b/pkgs/by-name/od/odin/system-raylib.patch index 3bd5f848e384..9aa78b02b5e3 100644 --- a/pkgs/by-name/od/odin/system-raylib.patch +++ b/pkgs/by-name/od/odin/system-raylib.patch @@ -1,14 +1,11 @@ diff --git a/vendor/raylib/raygui.odin b/vendor/raylib/raygui.odin -index 559437a60..cd31fbe43 100644 +index b02fa4438..23e8704ed 100644 --- a/vendor/raylib/raygui.odin +++ b/vendor/raylib/raygui.odin -@@ -2,34 +2,7 @@ package raylib - - import "core:c" - --RAYGUI_SHARED :: #config(RAYGUI_SHARED, false) --RAYGUI_WASM_LIB :: #config(RAYGUI_WASM_LIB, "wasm/libraygui.a") -- +@@ -5,31 +5,7 @@ import "core:c" + RAYGUI_SHARED :: #config(RAYGUI_SHARED, false) + RAYGUI_WASM_LIB :: #config(RAYGUI_WASM_LIB, "wasm/libraygui.a") + -when ODIN_OS == .Windows { - foreign import lib { - "windows/rayguidll.lib" when RAYGUI_SHARED else "windows/raygui.lib", @@ -20,7 +17,7 @@ index 559437a60..cd31fbe43 100644 -} else when ODIN_OS == .Darwin { - when ODIN_ARCH == .arm64 { - foreign import lib { -- "macos-arm64/libraygui.dylib" when RAYGUI_SHARED else "macos-arm64/libraygui.a", +- "macos/libraygui-arm64.dylib" when RAYGUI_SHARED else "macos/libraygui-arm64.a", - } - } else { - foreign import lib { @@ -35,20 +32,17 @@ index 559437a60..cd31fbe43 100644 - foreign import lib "system:raygui" -} +foreign import lib "system:raygui" - + RAYGUI_VERSION :: "4.0" - + diff --git a/vendor/raylib/raylib.odin b/vendor/raylib/raylib.odin -index b051f1885..9376dcc48 100644 +index 0a30fd72b..91a2b8bac 100644 --- a/vendor/raylib/raylib.odin +++ b/vendor/raylib/raylib.odin -@@ -97,42 +97,7 @@ MAX_MATERIAL_MAPS :: #config(RAYLIB_MAX_MATERIAL_MAPS, 12) - - #assert(size_of(rune) == size_of(c.int)) - --RAYLIB_SHARED :: #config(RAYLIB_SHARED, false) --RAYLIB_WASM_LIB :: #config(RAYLIB_WASM_LIB, "wasm/libraylib.a") -- +@@ -99,53 +99,7 @@ MAX_MATERIAL_MAPS :: #config(RAYLIB_MAX_MATERIAL_MAPS, 12) + RAYLIB_SHARED :: #config(RAYLIB_SHARED, false) + RAYLIB_WASM_LIB :: #config(RAYLIB_WASM_LIB, "wasm/libraylib.web.a") + -when ODIN_OS == .Windows { - @(extra_linker_flags="/NODEFAULTLIB:" + ("msvcrt" when RAYLIB_SHARED else "libcmt")) - foreign import lib { @@ -59,18 +53,32 @@ index b051f1885..9376dcc48 100644 - "system:Shell32.lib", - } -} else when ODIN_OS == .Linux { -- foreign import lib { -- // Note(bumbread): I'm not sure why in `linux/` folder there are -- // multiple copies of raylib.so, but since these bindings are for -- // particular version of the library, I better specify it. Ideally, -- // though, it's best specified in terms of major (.so.4) -- "linux/libraylib.so.550" when RAYLIB_SHARED else "linux/libraylib.a", -- "system:dl", -- "system:pthread", +- when ODIN_ARCH == .arm64 { +- foreign import lib { +- // Note(bumbread): I'm not sure why in `linux/` folder there are +- // multiple copies of raylib.so, but since these bindings are for +- // particular version of the library, I better specify it. Ideally, +- // though, it's best specified in terms of major (.so.4) +- "linux-arm64/libraylib.so.600" when RAYLIB_SHARED else "linux-arm/libraylib.a", +- "system:dl", +- "system:pthread", +- "system:X11", +- } +- } else { +- foreign import lib { +- // Note(bumbread): I'm not sure why in `linux/` folder there are +- // multiple copies of raylib.so, but since these bindings are for +- // particular version of the library, I better specify it. Ideally, +- // though, it's best specified in terms of major (.so.4) +- "linux/libraylib.so.600" when RAYLIB_SHARED else "linux/libraylib.a", +- "system:dl", +- "system:pthread", +- "system:X11", +- } - } -} else when ODIN_OS == .Darwin { - foreign import lib { -- "macos/libraylib.550.dylib" when RAYLIB_SHARED else "macos/libraylib.a", +- "macos/libraylib.600.dylib" when RAYLIB_SHARED else "macos/libraylib.a", - "system:Cocoa.framework", - "system:OpenGL.framework", - "system:IOKit.framework", @@ -83,60 +91,6 @@ index b051f1885..9376dcc48 100644 - foreign import lib "system:raylib" -} +foreign import lib "system:raylib" - - VERSION_MAJOR :: 5 - VERSION_MINOR :: 5 -diff --git a/vendor/raylib/rlgl/rlgl.odin b/vendor/raylib/rlgl/rlgl.odin -index 14a7cf5b0..a8e641220 100644 ---- a/vendor/raylib/rlgl/rlgl.odin -+++ b/vendor/raylib/rlgl/rlgl.odin -@@ -112,47 +112,7 @@ import rl "../." - - VERSION :: "5.0" - --RAYLIB_SHARED :: #config(RAYLIB_SHARED, false) --RAYLIB_WASM_LIB :: #config(RAYLIB_WASM_LIB, "../wasm/libraylib.a") -- --// Note: We pull in the full raylib library. If you want a truly stand-alone rlgl, then: --// - Compile a separate rlgl library and use that in the foreign import blocks below. --// - Remove the `import rl "../."` line --// - Copy the code from raylib.odin for any types we alias from that package (see PixelFormat etc) -- --when ODIN_OS == .Windows { -- @(extra_linker_flags="/NODEFAULTLIB:" + ("msvcrt" when RAYLIB_SHARED else "libcmt")) -- foreign import lib { -- "../windows/raylibdll.lib" when RAYLIB_SHARED else "../windows/raylib.lib" , -- "system:Winmm.lib", -- "system:Gdi32.lib", -- "system:User32.lib", -- "system:Shell32.lib", -- } --} else when ODIN_OS == .Linux { -- foreign import lib { -- // Note(bumbread): I'm not sure why in `linux/` folder there are -- // multiple copies of raylib.so, but since these bindings are for -- // particular version of the library, I better specify it. Ideally, -- // though, it's best specified in terms of major (.so.4) -- "../linux/libraylib.so.550" when RAYLIB_SHARED else "../linux/libraylib.a", -- "system:dl", -- "system:pthread", -- } --} else when ODIN_OS == .Darwin { -- foreign import lib { -- "../macos/libraylib.550.dylib" when RAYLIB_SHARED else "../macos/libraylib.a", -- "system:Cocoa.framework", -- "system:OpenGL.framework", -- "system:IOKit.framework", -- } --} else when ODIN_ARCH == .wasm32 || ODIN_ARCH == .wasm64p32 { -- foreign import lib { -- RAYLIB_WASM_LIB, -- } --} else { -- foreign import lib "system:raylib" --} -+foreign import lib "system:raylib" - - GRAPHICS_API_OPENGL_11 :: false - GRAPHICS_API_OPENGL_21 :: true + VERSION_MAJOR :: 6 + VERSION_MINOR :: 0 diff --git a/pkgs/by-name/ol/ols/package.nix b/pkgs/by-name/ol/ols/package.nix index 8923a725df90..5d49f8d82cc3 100644 --- a/pkgs/by-name/ol/ols/package.nix +++ b/pkgs/by-name/ol/ols/package.nix @@ -17,6 +17,12 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-9tQVyauvXGTkKnQUSYKAhjL5ZZbhglqdcxdcs27P2k4="; }; + patches = [ + # Since Odin removed Haiku support in dev-2026-06 and there is still no update + # for ols we're removing the haiku parts so that this builds again + ./remove-haiku.patch + ]; + postPatch = '' substituteInPlace build.sh \ --replace-fail "-microarch:native" "" diff --git a/pkgs/by-name/ol/ols/remove-haiku.patch b/pkgs/by-name/ol/ols/remove-haiku.patch new file mode 100644 index 000000000000..96fa461e90de --- /dev/null +++ b/pkgs/by-name/ol/ols/remove-haiku.patch @@ -0,0 +1,43 @@ +diff --git a/src/server/build.odin b/src/server/build.odin +index 1c1f2290..aaf6d2a4 100644 +--- a/src/server/build.odin ++++ b/src/server/build.odin +@@ -28,7 +28,6 @@ platform_os: map[string]struct{} = { + "openbsd" = {}, + "wasi" = {}, + "wasm" = {}, +- "haiku" = {}, + "netbsd" = {}, + "freebsd" = {}, + } +@@ -42,7 +41,6 @@ os_enum_to_string: [runtime.Odin_OS_Type]string = { + .WASI = "wasi", + .JS = "js", + .Freestanding = "freestanding", +- .Haiku = "haiku", + .OpenBSD = "openbsd", + .NetBSD = "netbsd", + .Orca = "orca", +@@ -69,8 +67,6 @@ os_string_to_enum: map[string]runtime.Odin_OS_Type = { + "freestanding" = .Freestanding, + "Wasm" = .JS, + "wasm" = .JS, +- "Haiku" = .Haiku, +- "haiku" = .Haiku, + "Openbsd" = .OpenBSD, + "openbsd" = .OpenBSD, + "OpenBSD" = .OpenBSD, +@@ -125,7 +121,12 @@ skip_file :: proc(filename: string) -> bool { + + // Finds all packages under the provided path by walking the file system + // and appends them to the provided dynamic array +-append_packages :: proc(path: string, pkgs: ^[dynamic]string, skip: map[string]struct{}, allocator := context.temp_allocator) { ++append_packages :: proc( ++ path: string, ++ pkgs: ^[dynamic]string, ++ skip: map[string]struct{}, ++ allocator := context.temp_allocator, ++) { + w := os.walker_create(path) + defer os.walker_destroy(&w) + for info in os.walker_walk(&w) {