Unverified Commit d55b8ed6 authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt Committed by GitHub
Browse files

libiec61850: Add mbedtls support (#403075)

parents 2cb26015 6b3a43b3
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
{
  cmake,
  mbedtls,
  lib,
  stdenv,
  fetchFromGitHub,
  gitUpdater,
  withTls ? !stdenv.hostPlatform.isDarwin,
}:

stdenv.mkDerivation (finalAttrs: {
@@ -19,7 +21,14 @@ stdenv.mkDerivation (finalAttrs: {

  separateDebugInfo = true;

  cmakeFlags = lib.optionals withTls [
    "-DCONFIG_USE_EXTERNAL_MBEDTLS_DYNLIB=ON"
    "-DCONFIG_EXTERNAL_MBEDTLS_DYNLIB_PATH=${mbedtls}/lib"
    "-DCONFIG_EXTERNAL_MBEDTLS_INCLUDE_PATH=${mbedtls}/include"
  ];

  nativeBuildInputs = [ cmake ];
  buildInputs = lib.optionals withTls [ mbedtls ];

  passthru.updateScript = gitUpdater { rev-prefix = "v"; };

@@ -27,7 +36,10 @@ stdenv.mkDerivation (finalAttrs: {
    description = "Open-source library for the IEC 61850 protocols";
    homepage = "https://libiec61850.com/";
    license = lib.licenses.gpl3Only;
    maintainers = with lib.maintainers; [ stv0g ];
    maintainers = with lib.maintainers; [
      stv0g
      pjungkamp
    ];
    platforms = lib.platforms.unix;
  };
})