Unverified Commit c5c69173 authored by Clément's avatar Clément
Browse files

nitrokey-app: fix build failure with cmake 4

- CMake 4 is no longer retro compatible with versions < 3.5
parent 649e76f7
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -38,6 +38,17 @@ stdenv.mkDerivation rec {
    cppcodec
  ];

  # CMake 3.1 is deprecated and is no longer supported by CMake > 4
  # https://github.com/NixOS/nixpkgs/issues/445447
  postPatch = ''
    substituteInPlace CMakeLists.txt --replace-fail \
      "CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0 FATAL_ERROR)" \
      "cmake_minimum_required(VERSION 3.10  FATAL_ERROR)" \
    --replace-fail \
      "cmake_policy(SET CMP0043 OLD)" \
      "cmake_policy(SET CMP0043 NEW)"
  '';

  meta = with lib; {
    description = "Provides extra functionality for the Nitrokey Pro and Storage";
    mainProgram = "nitrokey-app";