Unverified Commit 174289e8 authored by Cosima Neidahl's avatar Cosima Neidahl Committed by GitHub
Browse files

net-cpp: 3.2.0 -> 3.2.1 (#499827)

parents 380ef212 614c5b38
Loading
Loading
Loading
Loading
+11 −20
Original line number Diff line number Diff line
@@ -31,13 +31,13 @@ let
in
stdenv.mkDerivation (finalAttrs: {
  pname = "net-cpp";
  version = "3.2.0";
  version = "3.2.1";

  src = fetchFromGitLab {
    owner = "ubports";
    repo = "development/core/lib-cpp/net-cpp";
    rev = finalAttrs.version;
    hash = "sha256-JfVSAwBWtHw7a0CtY5C1xuxThO3FbS4MgNuIO1CGuts=";
    tag = finalAttrs.version;
    hash = "sha256-1rUPdN62u4eYtrXgoVaeSHro4gnAfFAl1brt+tE45oE=";
  };

  outputs = [
@@ -47,26 +47,14 @@ stdenv.mkDerivation (finalAttrs: {
  ];

  patches = [
    # Remove when version > 3.2.0
    # Remove when version > 3.2.1
    (fetchpatch {
      name = "0001-net-cpp-fix-compatibility-with-Boost-1.88.patch";
      url = "https://gitlab.com/ubports/development/core/lib-cpp/net-cpp/-/commit/9ff8651b11eb9dc0f64147001e10a57d1546a626.patch";
      hash = "sha256-IEa3nhnv0oa5WmhIDG3OMrZmmoAZFeedAzKXAKVTIQg=";
      name = "0001-net-cpp-Look-for-python3-executable-at-configure-time-instead-of-hardcoding-a-path.patch";
      url = "https://gitlab.com/ubports/development/core/lib-cpp/net-cpp/-/commit/811da28f36f34cc2ea32dc96b2c65932d4f954b0.patch";
      hash = "sha256-CC7fEuRNuf5TNEfhFJr9VLWFWfTnFtIvSTUoCcwGe68=";
    })
  ];

  postPatch =
    # https://gitlab.com/ubports/development/core/lib-cpp/net-cpp/-/merge_requests/22, too basic to bother with fetchpatch
    ''
      substituteInPlace src/CMakeLists.txt \
        --replace-fail 'find_package(Boost COMPONENTS system' 'find_package(Boost COMPONENTS'
    ''
    + lib.optionalString finalAttrs.finalPackage.doCheck ''
      # Use wrapped python. Removing just the /usr/bin doesn't seem to work?
      substituteInPlace tests/httpbin.h.in \
        --replace '/usr/bin/python3' '${lib.getExe pythonEnv}'
    '';

  strictDeps = true;

  nativeBuildInputs = [
@@ -107,7 +95,10 @@ stdenv.mkDerivation (finalAttrs: {
  enableParallelChecking = false;

  passthru = {
    tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
    tests.pkg-config = testers.hasPkgConfigModules {
      package = finalAttrs.finalPackage;
      versionCheck = true;
    };
    updateScript = gitUpdater { };
  };