Unverified Commit 2cd3686f authored by Grimmauld's avatar Grimmauld Committed by GitHub
Browse files

Some CMake v4 fixes (#444660)

parents 11629914 25414e6a
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  lib,
  stdenv,
  fetchFromGitHub,
  fetchpatch,
  cmake,
  libGLU,
  libGL,
@@ -26,6 +27,14 @@ stdenv.mkDerivation rec {
    libglut
  ];

  patches = [
    # fix for CMake v4, merged upstream
    (fetchpatch {
      url = "https://github.com/bulletphysics/bullet3/commit/d1a4256b3a019117f2bb6cb8c63d6367aaf512e2.patch";
      hash = "sha256-FklMKYw5dKUcR5kZOkqv+KVLcWL/7r/0SAdYolmrn5A=";
    })
  ];

  postPatch = ''
    substituteInPlace examples/ThirdPartyLibs/Gwen/CMakeLists.txt \
      --replace "-DGLEW_STATIC" "-DGLEW_STATIC -Wno-narrowing"
+5 −5
Original line number Diff line number Diff line
@@ -8,15 +8,15 @@
  enableUnicodeHelp ? true,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "cxxopts";
  version = "3.2.1";
  version = "3.3.1";

  src = fetchFromGitHub {
    owner = "jarro2783";
    repo = "cxxopts";
    rev = "v${version}";
    sha256 = "sha256-aOF3owz7SIV4trJY0PnMtIcwqoUpDbB3tNxZcsl9dzM=";
    rev = "v${finalAttrs.version}";
    hash = "sha256-baM6EX9D0yfrKxuPXyUUV9RqdrVLyygeG6x57xN8lc4=";
  };

  buildInputs = lib.optionals enableUnicodeHelp [ icu74.dev ];
@@ -44,4 +44,4 @@ stdenv.mkDerivation rec {
    maintainers = [ maintainers.spease ];
    platforms = platforms.all;
  };
}
})
+3 −3
Original line number Diff line number Diff line
@@ -10,13 +10,13 @@
stdenv.mkDerivation (finalAttrs: {
  pname = "hpipm";
  #version = "0.1.3";  not building, use master instead
  version = "0-unstable-2024-07-30";
  version = "0.1.3-unstable-2025-09-25";

  src = fetchFromGitHub {
    owner = "giaf";
    repo = "hpipm";
    rev = "3ab7d6059d9d7da31ec9ff6a8ca84fd8ec5ab5e2";
    hash = "sha256-TRNHjW2/YDfGJHTG9sy2nmHyk6+HlBGIabPm87TETE8=";
    rev = "8f3a2d00f6d1bd7101fb651391fba79377915288";
    hash = "sha256-XtnUs1RiB7zJOv7zdRzB31hnxDYaiH+Q4SLyE6/kuEg=";
  };

  nativeBuildInputs = [ cmake ];
+8 −0
Original line number Diff line number Diff line
@@ -26,6 +26,14 @@ stdenv.mkDerivation rec {
    })
  ];

  # fix for CMake v4
  # ref https://github.com/danfis/libccd/pull/82, not merged yet
  postPatch = ''
    substituteInPlace CMakeLists.txt --replace-fail \
      "cmake_minimum_required(VERSION 2.8.11)" \
      "cmake_minimum_required(VERSION 3.12)"
  '';

  nativeBuildInputs = [ cmake ];

  meta = with lib; {
+7 −0
Original line number Diff line number Diff line
@@ -135,6 +135,13 @@ stdenv.mkDerivation rec {
    })
  ];

  # ref. https://github.com/openscenegraph/OpenSceneGraph/pull/1373
  postPatch = ''
    substituteInPlace CMakeLists.txt --replace-fail \
      "CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)" \
      "CMAKE_MINIMUM_REQUIRED(VERSION 3.10)"
  '';

  cmakeFlags =
    lib.optional (!withApps) "-DBUILD_OSG_APPLICATIONS=OFF"
    ++ lib.optional withExamples "-DBUILD_OSG_EXAMPLES=ON";
Loading