From c35d5cf5fdff84440b81d87b708a3ab15df99a22 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Sun, 24 Mar 2024 12:19:18 +0100 Subject: [PATCH] omniorb: allow installation of other backends than cxx --- pkgs/development/tools/omniorb/default.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkgs/development/tools/omniorb/default.nix b/pkgs/development/tools/omniorb/default.nix index d9bca7061c1a..acc1dd1403dd 100644 --- a/pkgs/development/tools/omniorb/default.nix +++ b/pkgs/development/tools/omniorb/default.nix @@ -21,6 +21,21 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; hardeningDisable = [ "format" ]; + # Transform omniidl_be into a PEP420 namespace to allow other projects to define + # their omniidl backends. Especially useful for omniorbpy, the python backend. + postInstall = '' + rm $out/${python3.sitePackages}/omniidl_be/__init__.py + rm $out/${python3.sitePackages}/omniidl_be/__pycache__/__init__.*.pyc + ''; + + # Ensure postInstall didn't break cxx backend + # Same as 'pythonImportsCheck = ["omniidl_be.cxx"];', but outside buildPythonPackage + doInstallCheck = true; + postInstallCheck = '' + export PYTHONPATH=$out/${python3.sitePackages}:$PYTHONPATH + ${lib.getExe python3} -c "import omniidl_be.cxx" + ''; + meta = with lib; { description = "A robust high performance CORBA ORB for C++ and Python"; longDescription = ''