Commit af3f975c authored by OPNA2608's avatar OPNA2608
Browse files

net-cpp: Fix FTBFS

- Pin to boost 1.86
- Fetch Debian patch to fix compat with newer flask
parent 96b88c68
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -5,7 +5,8 @@
  fetchpatch,
  gitUpdater,
  testers,
  boost,
  # https://gitlab.com/ubports/development/core/lib-cpp/net-cpp/-/issues/5
  boost186,
  cmake,
  curl,
  doxygen,
@@ -50,11 +51,18 @@ stdenv.mkDerivation (finalAttrs: {
      url = "https://salsa.debian.org/ubports-team/net-cpp/-/raw/941d9eceaa66a06eabb1eb79554548b47d4a60ab/debian/patches/1007_wait-for-flask.patch";
      hash = "sha256-nsGkZBuqahsg70PLUxn5EluDjmfZ0/wSnOYimfAI4ag=";
    })

    # Bump std version to 14 for gtest 1.13+
    (fetchpatch {
      url = "https://salsa.debian.org/ubports-team/net-cpp/-/raw/f3a031eb7e4ce7df00781100f16de58a4709afcb/debian/patches/0001-Bump-std-version-to-14-needed-for-googletest-1.13.0.patch";
      hash = "sha256-3ykqCfZjtTx7zWQ5rkMhVp7D5fkpoCjl0CVFwwEd4U4=";
    })

    # Fix newer flask rejecting large chunks by default
    (fetchpatch {
      url = "https://salsa.debian.org/ubports-team/net-cpp/-/raw/f2050b5318cba3860fa1042e9b81e1b792b972c4/debian/patches/1008_set-MAX-CONTENT-LENGTH-for-flask-server-to-let-it-accept-big-chunks-of-data.patch";
      hash = "sha256-lfMRjpmysrhzdG6OOSpBGvYJCi1hrERI/SRf+rAakbA=";
    })
  ];

  postPatch = lib.optionalString finalAttrs.finalPackage.doCheck ''
@@ -73,7 +81,7 @@ stdenv.mkDerivation (finalAttrs: {
  ];

  buildInputs = [
    boost
    boost186
    curl
  ];