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