2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
cmake,
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
gitUpdater,
|
2024-06-24 18:47:55 +00:00
|
|
|
mbedtls_2,
|
2024-04-21 15:54:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "lib60870";
|
|
|
|
version = "2.3.2";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mz-automation";
|
|
|
|
repo = "lib60870";
|
|
|
|
rev = "v${finalAttrs.version}";
|
|
|
|
hash = "sha256-9o+gWQbpCJb+UZzPNmzGqpWD0QbGjg41is/f1POUEQs=";
|
|
|
|
};
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
sourceRoot = "${finalAttrs.src.name}/lib60870-C";
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
separateDebugInfo = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2024-06-24 18:47:55 +00:00
|
|
|
buildInputs = [ mbedtls_2 ];
|
|
|
|
|
|
|
|
cmakeFlags = [ (lib.cmakeBool "WITH_MBEDTLS" true) ];
|
|
|
|
|
|
|
|
env.NIX_LDFLAGS = "-lmbedcrypto -lmbedx509 -lmbedtls";
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Implementation of the IEC 60870-5-101/104 protocol";
|
|
|
|
homepage = "https://libiec61850.com/";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ stv0g ];
|
2024-06-20 14:57:18 +00:00
|
|
|
platforms = platforms.unix;
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
|
|
|
})
|