package.nix (1375B)
1 { 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 boost179, 7 openssl, 8 }: 9 10 stdenv.mkDerivation (finalAttrs: { 11 pname = "opcua-stack"; 12 version = "4.0.0"; 13 14 src = fetchFromGitHub { 15 owner = "ASNeG"; 16 repo = "OpcUaStack"; 17 tag = finalAttrs.version; 18 hash = "sha256-/PiawQ3kXK4wB/PxQ5EJJsuOOFZdkr/BeQ3zbl7N7fs="; 19 }; 20 21 sourceRoot = "${finalAttrs.src.name}/src"; 22 23 postPatch = '' 24 substituteInPlace CMakeLists.txt --replace-fail "/usr" "$out" 25 substituteInPlace OpcUaClient/CMakeLists.txt \ 26 --replace-fail "/etc" "$out/etc" \ 27 --replace-fail "/var/log" "$out/var/log" 28 substituteInPlace OpcUaCtrl/CMakeLists.txt --replace-fail "/etc" "$out/etc" 29 substituteInPlace OpcUaStackCore/CMakeLists.txt --replace-fail "/usr" "$out" 30 substituteInPlace OpcUaStackServer/CMakeLists.txt --replace-fail "/usr" "$out" 31 substituteInPlace OpcUaGenerator/CMakeLists.txt --replace-fail "/usr" "$out" 32 ''; 33 34 nativeBuildInputs = [ cmake ]; 35 36 buildInputs = [ 37 boost179 38 openssl 39 ]; 40 41 installFlags = [ "INSTALL_PREFIX=$(out)" ]; 42 43 meta = { 44 description = "Open Source OPC UA Application Server and OPC UA Client/Server C++ Libraries"; 45 homepage = "https://asneg.github.io/projects/opcuastack"; 46 license = lib.licenses.asl20; 47 maintainers = [ lib.maintainers.sikmir ]; 48 platforms = lib.platforms.unix; 49 skip.ci = true; 50 }; 51 })