Unverified Commit 3648773c authored by Vladimír Čunát's avatar Vladimír Čunát Committed by GitHub
Browse files

globalprotect-openconnect: Fix build failure (#449791)

parents 41c1f0fb ff945666
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -24,6 +24,10 @@ stdenv.mkDerivation rec {
    wrapQtAppsHook
  ];

  cmakeFlags = [
    (lib.cmakeFeature "CMAKE_POLICY_VERSION_MINIMUM" "3.16")
  ];

  buildInputs = [
    openconnect
    qtwebsockets
@@ -33,9 +37,11 @@ stdenv.mkDerivation rec {

  patchPhase = ''
    substituteInPlace GPService/gpservice.h \
      --replace /usr/local/bin/openconnect ${openconnect}/bin/openconnect;
      --replace-fail /usr/local/bin/openconnect ${openconnect}/bin/openconnect;
    substituteInPlace GPService/CMakeLists.txt \
      --replace /etc/gpservice $out/etc/gpservice;
      --replace-fail /etc/gpservice $out/etc/gpservice;
    # Force minimum CMake version to 3.16 to avoid policy warnings
    find . -name "CMakeLists.txt" -exec sed -i 's/cmake_minimum_required(VERSION [^)]*)/cmake_minimum_required(VERSION 3.16)/g' {} \;
  '';

  meta = with lib; {