Merge pull request #298875 from nim65s/omniorbpy

omniorbpy: init at 4.3.2
This commit is contained in:
Pol Dellaiera 2024-03-25 11:14:38 +01:00 committed by GitHub
commit 23cede97d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 69 additions and 0 deletions

View File

@ -0,0 +1,54 @@
{
lib,
stdenv,
fetchurl,
omniorb,
pkg-config,
python3,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "omniorbpy";
version = "4.3.2";
src = fetchurl {
url = "http://downloads.sourceforge.net/omniorb/omniORBpy-${finalAttrs.version}.tar.bz2";
hash = "sha256-y1cX1BKhAbr0MPWYysfWkjGITa5DctjirfPd7rxffrs=";
};
nativeBuildInputs = [
pkg-config
];
propagatedBuildInputs = [
omniorb
];
configureFlags = [
"--with-omniorb=${omniorb}"
"PYTHON_PREFIX=$out"
"PYTHON=${lib.getExe python3}"
];
# Transform omniidl_be into a PEP420 namespace
postInstall = ''
rm $out/${python3.sitePackages}/omniidl_be/__init__.py
rm $out/${python3.sitePackages}/omniidl_be/__pycache__/__init__.*.pyc
'';
# Ensure both python & cxx backends are available
doInstallCheck = true;
postInstallCheck = ''
export PYTHONPATH=$out/${python3.sitePackages}:${omniorb}/${python3.sitePackages}:$PYTHONPATH
${lib.getExe python3} -c "import omniidl_be.cxx; import omniidl_be.python"
'';
meta = with lib; {
description = "The python backend for omniorb";
homepage = "http://omniorb.sourceforge.net";
license = with licenses; [ gpl2Plus lgpl21Plus ];
maintainers = with maintainers; [ nim65s ];
platforms = platforms.unix;
};
})

View File

@ -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 = ''