Commit efe67b91 authored by OPNA2608's avatar OPNA2608
Browse files

lomiri.teleports.passthru.tdlib: Fix CMake 4 compatibility

And make it separately buildable.
parent 4aff74ea
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -37,6 +37,15 @@ let
        rev = "3179d35694a28267a0b6273fc9b5bdce3b6b1235";
        hash = "sha256-XvqqDXaFclWK/XpIxOqAXQ9gcc/dTljl841CN0KrlyA=";
      };

      # CMake 4 compat
      postPatch = ''
        substituteInPlace CMakeLists.txt \
          --replace-fail 'cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)' 'cmake_minimum_required(VERSION 3.10 FATAL_ERROR)'

        substituteInPlace td/generate/tl-parser/CMakeLists.txt \
          --replace-fail 'cmake_minimum_required(VERSION 3.0 FATAL_ERROR)' 'cmake_minimum_required(VERSION 3.10 FATAL_ERROR)'
      '';
    }
  );
in
@@ -101,7 +110,7 @@ stdenv.mkDerivation (finalAttrs: {
    quazip
    quickflux
    rlottie
    tdlib-1811
    finalAttrs.passthru.tdlib
  ];

  postInstall = ''
@@ -115,6 +124,8 @@ stdenv.mkDerivation (finalAttrs: {
  '';

  passthru = {
    tdlib = tdlib-1811;

    updateScript = gitUpdater { rev-prefix = "v"; };
    tests.vm = nixosTests.teleports;
  };