Unverified Commit 18b66798 authored by Matteo Pacini's avatar Matteo Pacini Committed by GitHub
Browse files

catimg: fix build with cmake 4 (#449906)

parents 42066d1b 288698b6
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -17,6 +17,13 @@ stdenv.mkDerivation rec {
  };

  nativeBuildInputs = [ cmake ];

  # Fix build with CMake 4: https://github.com/NixOS/nixpkgs/issues/449801
  # CMake 4 removed support for CMake < 3.5, so we set the minimum policy version
  cmakeFlags = [
    (lib.cmakeFeature "CMAKE_POLICY_VERSION_MINIMUM" "3.5")
  ];

  env = lib.optionalAttrs (stdenv.hostPlatform.libc == "glibc") {
    CFLAGS = "-D_DEFAULT_SOURCE";
  };