lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

openbabel: unstable-06-12-23 -> 3.1.1-unstable-2024-12-21, fix build with CMake 4 (#443853)

authored by

K900 and committed by
GitHub
036a9242 1f5c6777

+187 -191
+21 -3
pkgs/by-name/co/coordgenlibs/package.nix
··· 1 1 { 2 2 fetchFromGitHub, 3 + fetchpatch, 3 4 lib, 4 5 stdenv, 5 6 boost, ··· 19 20 hash = "sha256-casFPNbPv9mkKpzfBENW7INClypuCO1L7clLGBXvSvI="; 20 21 }; 21 22 23 + patches = [ 24 + (fetchpatch { 25 + name = "coordgenlibs-fix-unused-but-set-variable.patch"; 26 + url = "https://github.com/schrodinger/coordgenlibs/commit/6a1485643feb71c6d609d263f28751004c733cf7.patch"; 27 + hash = "sha256-x34v+XumVip43LYb4bEkdqPFcTRTeC/zsRuQjnrh2zw="; 28 + }) 29 + ]; 30 + 22 31 nativeBuildInputs = [ cmake ]; 23 32 buildInputs = [ 24 33 boost ··· 26 35 maeparser 27 36 ]; 28 37 29 - env = lib.optionalAttrs stdenv.cc.isClang { 30 - NIX_CFLAGS_COMPILE = "-Wno-unused-but-set-variable"; 31 - }; 38 + # Fix the build with CMake 4. 39 + # 40 + # See: <https://github.com/schrodinger/coordgenlibs/pull/130> 41 + postPatch = '' 42 + substituteInPlace CMakeLists.txt \ 43 + --replace-fail \ 44 + 'cmake_minimum_required(VERSION 3.2)' \ 45 + 'cmake_minimum_required(VERSION 3.5)' 46 + ''; 32 47 33 48 doCheck = true; 49 + 50 + # Fix the build with Clang 20. 51 + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=deprecated-literal-operator"; 34 52 35 53 meta = with lib; { 36 54 description = "Schrodinger-developed 2D Coordinate Generation";
+77
pkgs/by-name/op/openbabel/fix-cmake-4.patch
··· 1 + From fda825d390af8b5eaf79d7b7c39c19ab5ce317ac Mon Sep 17 00:00:00 2001 2 + From: Nicolas PARLANT <nicolas.parlant@parhuet.fr> 3 + Date: Wed, 26 Mar 2025 10:24:42 +0000 4 + Subject: [PATCH] cmake4 compat : 5 + 6 + * up cmake_minimum_required to 3.10 7 + * delete CMP0042 because OLD behavior is removed in cmake-4 and 8 + is no longer used. 9 + * set ENABLE_EXPORTS for test_runner (OLD behavior for CMP0065 is removed 10 + in cmake4) 11 + 12 + Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr> 13 + --- 14 + CMakeLists.txt | 7 ++----- 15 + doc/examples/static_executable/CMakeLists.txt | 2 +- 16 + scripts/CMakeLists.txt | 2 +- 17 + test/CMakeLists.txt | 1 + 18 + 4 files changed, 5 insertions(+), 7 deletions(-) 19 + 20 + diff --git a/CMakeLists.txt b/CMakeLists.txt 21 + index 9d2a9f143e..f8440e412e 100644 22 + --- a/CMakeLists.txt 23 + +++ b/CMakeLists.txt 24 + @@ -1,6 +1,6 @@ 25 + -# Please ensure that any changes remain compliant with 3.1. 26 + +# Please ensure that any changes remain compliant with 3.10. 27 + if(NOT EMBED_OPENBABEL) 28 + - cmake_minimum_required(VERSION 3.1) 29 + + cmake_minimum_required(VERSION 3.10) 30 + endif() 31 + 32 + project(openbabel) 33 + @@ -10,9 +10,6 @@ set (CMAKE_CXX_STANDARD 11) 34 + 35 + if(COMMAND cmake_policy) 36 + cmake_policy(SET CMP0003 NEW) 37 + - if(POLICY CMP0042) 38 + - cmake_policy(SET CMP0042 OLD) 39 + - endif() 40 + endif() 41 + 42 + include (CheckCXXCompilerFlag) 43 + diff --git a/doc/examples/static_executable/CMakeLists.txt b/doc/examples/static_executable/CMakeLists.txt 44 + index 0ed21beaaf..63dae2a468 100644 45 + --- a/doc/examples/static_executable/CMakeLists.txt 46 + +++ b/doc/examples/static_executable/CMakeLists.txt 47 + @@ -25,7 +25,7 @@ 48 + # 49 + 50 + # This line is required for cmake backwards compatibility. 51 + -cmake_minimum_required(VERSION 2.6) 52 + +cmake_minimum_required(VERSION 3.10) 53 + 54 + # Name of your project 55 + project(myproject) 56 + diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt 57 + index 792e4592d0..eafda66c5a 100644 58 + --- a/scripts/CMakeLists.txt 59 + +++ b/scripts/CMakeLists.txt 60 + @@ -1,4 +1,4 @@ 61 + -cmake_minimum_required(VERSION 2.6.0) 62 + +cmake_minimum_required(VERSION 3.10.0) 63 + # Library versioning (used in Mac Python bindings)x 64 + set(SOVERSION 4) 65 + 66 + diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt 67 + index 2ecf0dbe22..280eac471f 100644 68 + --- a/test/CMakeLists.txt 69 + +++ b/test/CMakeLists.txt 70 + @@ -152,6 +152,7 @@ endif() 71 + 72 + add_executable(test_runner ${srclist} obtest.cpp) 73 + target_link_libraries(test_runner ${libs}) 74 + +set_target_properties(test_runner PROPERTIES ENABLE_EXPORTS TRUE) 75 + 76 + if(NOT BUILD_SHARED AND NOT BUILD_MIXED) 77 + set_target_properties(test_runner PROPERTIES LINK_SEARCH_END_STATIC TRUE)
+84
pkgs/by-name/op/openbabel/package.nix
··· 1 + { 2 + stdenv, 3 + lib, 4 + fetchFromGitHub, 5 + cmake, 6 + ninja, 7 + perl, 8 + zlib, 9 + libxml2, 10 + eigen, 11 + python3, 12 + cairo, 13 + pkg-config, 14 + swig, 15 + rapidjson, 16 + boost, 17 + maeparser, 18 + coordgenlibs, 19 + ctestCheckHook, 20 + }: 21 + 22 + stdenv.mkDerivation { 23 + pname = "openbabel"; 24 + version = "3.1.1-unstable-2024-12-21"; 25 + 26 + src = fetchFromGitHub { 27 + owner = "openbabel"; 28 + repo = "openbabel"; 29 + rev = "889c350feb179b43aa43985799910149d4eaa2bc"; 30 + hash = "sha256-pJbvKBjpvXNjTZRxD2AqEarqmq+Pq08uvGvog/k/a7k="; 31 + }; 32 + 33 + patches = [ 34 + # <https://github.com/openbabel/openbabel/pull/2784> 35 + ./fix-cmake-4.patch 36 + ]; 37 + 38 + nativeBuildInputs = [ 39 + cmake 40 + ninja 41 + swig 42 + pkg-config 43 + ]; 44 + 45 + buildInputs = [ 46 + perl 47 + zlib 48 + libxml2 49 + eigen 50 + python3 51 + cairo 52 + rapidjson 53 + boost 54 + maeparser 55 + coordgenlibs 56 + ]; 57 + 58 + nativeCheckInputs = [ 59 + ctestCheckHook 60 + ]; 61 + 62 + cmakeFlags = [ 63 + (lib.cmakeBool "RUN_SWIG" true) 64 + (lib.cmakeBool "PYTHON_BINDINGS" true) 65 + (lib.cmakeFeature "PYTHON_INSTDIR" "${placeholder "out"}/${python3.sitePackages}") 66 + ]; 67 + 68 + disabledTests = [ 69 + "test_cifspacegroup_11" 70 + "pybindtest_obconv_writers" 71 + ]; 72 + 73 + doCheck = true; 74 + 75 + dontUseNinjaCheck = true; 76 + 77 + meta = { 78 + description = "Toolbox designed to speak the many languages of chemical data"; 79 + homepage = "http://openbabel.org"; 80 + platforms = lib.platforms.all; 81 + license = lib.licenses.gpl2Plus; 82 + maintainers = with lib.maintainers; [ danielbarter ]; 83 + }; 84 + }
-62
pkgs/development/libraries/openbabel/2.nix
··· 1 - { 2 - stdenv, 3 - lib, 4 - fetchFromGitHub, 5 - fetchpatch, 6 - cmake, 7 - zlib, 8 - libxml2, 9 - eigen, 10 - python3, 11 - cairo, 12 - pcre, 13 - pkg-config, 14 - }: 15 - 16 - stdenv.mkDerivation rec { 17 - pname = "openbabel"; 18 - version = "2.4.1"; 19 - 20 - src = fetchFromGitHub { 21 - owner = "openbabel"; 22 - repo = "openbabel"; 23 - rev = "openbabel-${lib.replaceStrings [ "." ] [ "-" ] version}"; 24 - sha256 = "sha256-+pXsWMzex7rB1mm6dnTHzAcyw9jImgx1OZuLeCvbeJ0="; 25 - }; 26 - 27 - patches = [ 28 - # ARM / AArch64 fixes. 29 - (fetchpatch { 30 - url = "https://github.com/openbabel/openbabel/commit/ee11c98a655296550710db1207b294f00e168216.patch"; 31 - sha256 = "0wjqjrkr4pfirzzicdvlyr591vppydk572ix28jd2sagnfnf566g"; 32 - }) 33 - ]; 34 - 35 - postPatch = '' 36 - sed '1i#include <ctime>' -i include/openbabel/obutil.h # gcc12 37 - ''; 38 - 39 - buildInputs = [ 40 - zlib 41 - libxml2 42 - eigen 43 - python3 44 - cairo 45 - pcre 46 - ]; 47 - 48 - cmakeFlags = [ "-DCMAKE_CXX_STANDARD=14" ]; 49 - 50 - nativeBuildInputs = [ 51 - cmake 52 - pkg-config 53 - ]; 54 - 55 - meta = with lib; { 56 - description = "Toolbox designed to speak the many languages of chemical data"; 57 - homepage = "http://openbabel.org"; 58 - platforms = platforms.all; 59 - maintainers = with maintainers; [ danielbarter ]; 60 - license = licenses.gpl2Plus; 61 - }; 62 - }
-84
pkgs/development/libraries/openbabel/default.nix
··· 1 - { 2 - stdenv, 3 - lib, 4 - fetchFromGitHub, 5 - cmake, 6 - perl, 7 - zlib, 8 - libxml2, 9 - eigen, 10 - python3, 11 - cairo, 12 - pkg-config, 13 - swig, 14 - rapidjson, 15 - boost, 16 - maeparser, 17 - coordgenlibs, 18 - }: 19 - 20 - stdenv.mkDerivation rec { 21 - pname = "openbabel"; 22 - version = "unstable-06-12-23"; 23 - 24 - src = fetchFromGitHub { 25 - owner = "openbabel"; 26 - repo = pname; 27 - rev = "32cf131444c1555c749b356dab44fb9fe275271f"; 28 - hash = "sha256-V0wrZVrojCZ9Knc5H6cPzPoYWVosRZ6Sn4PX+UFEfHY="; 29 - }; 30 - 31 - postPatch = '' 32 - sed '1i#include <ctime>' -i include/openbabel/obutil.h # gcc12 33 - ''; 34 - 35 - buildInputs = [ 36 - perl 37 - zlib 38 - libxml2 39 - eigen 40 - python3 41 - cairo 42 - rapidjson 43 - boost 44 - maeparser 45 - coordgenlibs 46 - ]; 47 - 48 - nativeBuildInputs = [ 49 - cmake 50 - swig 51 - pkg-config 52 - ]; 53 - 54 - preConfigure = '' 55 - cmakeFlagsArray+=( 56 - "-DRUN_SWIG=ON" 57 - "-DPYTHON_BINDINGS=ON" 58 - "-DPYTHON_INSTDIR=$out/${python3.sitePackages}" 59 - ) 60 - ''; 61 - 62 - # Setuptools only accepts PEP 440 version strings. The "unstable" identifier 63 - # can not be used. Instead we pretend to be the 3.2 beta release. 64 - postFixup = '' 65 - cat << EOF > $out/${python3.sitePackages}/setup.py 66 - from setuptools import setup 67 - 68 - setup( 69 - name = 'pyopenbabel', 70 - version = '3.2b1', 71 - packages = ['openbabel'], 72 - package_data = {'openbabel' : ['_openbabel.so']} 73 - ) 74 - EOF 75 - ''; 76 - 77 - meta = with lib; { 78 - description = "Toolbox designed to speak the many languages of chemical data"; 79 - homepage = "http://openbabel.org"; 80 - platforms = platforms.all; 81 - license = licenses.gpl2Plus; 82 - maintainers = with maintainers; [ danielbarter ]; 83 - }; 84 - }
+1 -1
pkgs/development/libraries/science/chemistry/avogadrolibs/default.nix
··· 20 20 let 21 21 pythonWP = python3.withPackages ( 22 22 p: with p; [ 23 - openbabel-bindings 23 + openbabel 24 24 numpy 25 25 ] 26 26 );
-32
pkgs/development/python-modules/openbabel-bindings/default.nix
··· 1 - { 2 - lib, 3 - openbabel, 4 - python, 5 - buildPythonPackage, 6 - }: 7 - 8 - buildPythonPackage { 9 - format = "setuptools"; 10 - inherit (openbabel) pname version; 11 - 12 - src = "${openbabel}/${python.sitePackages}"; 13 - 14 - buildInputs = [ openbabel ]; 15 - 16 - # these env variables are used by the bindings to find libraries 17 - # they need to be included explicitly in your nix-shell for 18 - # some functionality to work (inparticular, pybel). 19 - # see https://openbabel.org/docs/dev/Installation/install.html 20 - BABEL_LIBDIR = "${openbabel}/lib/openbabel/3.1.0"; 21 - LD_LIBRARY_PATH = "${openbabel}/lib"; 22 - 23 - doCheck = false; 24 - pythonImportsCheck = [ "openbabel" ]; 25 - 26 - meta = with lib; { 27 - homepage = "http://openbabel.org/wiki/Main_Page"; 28 - description = "Python bindings for openbabel"; 29 - license = licenses.gpl2Plus; 30 - maintainers = with maintainers; [ danielbarter ]; 31 - }; 32 - }
+2
pkgs/top-level/aliases.nix
··· 1860 1860 onevpl-intel-gpu = lib.warnOnInstantiate "onevpl-intel-gpu has been renamed to vpl-gpu-rt" vpl-gpu-rt; # Added 2024-06-04 1861 1861 openai-triton-llvm = triton-llvm; # added 2024-07-18 1862 1862 openai-whisper-cpp = whisper-cpp; # Added 2024-12-13 1863 + openbabel2 = throw "openbabel2 has been removed, as it was unused and unmaintained upstream; please use openbabel"; # Added 2025-09-17 1864 + openbabel3 = openbabel; # Added 2025-09-17 1863 1865 opencv2 = throw "opencv2 has been removed as it is obsolete and was not used by any other package; please migrate to OpenCV 4"; # Added 2024-08-20 1864 1866 opencv3 = throw "opencv3 has been removed as it is obsolete and was not used by any other package; please migrate to OpenCV 4"; # Added 2024-08-20 1865 1867 openafs_1_8 = openafs; # Added 2022-08-22
-6
pkgs/top-level/all-packages.nix
··· 8499 8499 8500 8500 openal = openalSoft; 8501 8501 8502 - openbabel = openbabel3; 8503 - 8504 - openbabel2 = callPackage ../development/libraries/openbabel/2.nix { }; 8505 - 8506 - openbabel3 = callPackage ../development/libraries/openbabel { }; 8507 - 8508 8502 opencascade-occt_7_6 = opencascade-occt.overrideAttrs rec { 8509 8503 pname = "opencascade-occt"; 8510 8504 version = "7.6.2";
+1
pkgs/top-level/python-aliases.nix
··· 494 494 openai-triton-cuda = triton-cuda; # added 2024-07-18 495 495 openai-triton-no-cuda = triton-no-cuda; # added 2024-07-18 496 496 openapi-schema-pydantic = throw "openapi-schema-pydantic has been removed, since it is no longer maintained"; # added 2023-10-30 497 + openbabel-bindings = openbabel; # added 2025-09-17 497 498 opencv3 = throw "opencv3 has been removed as it is obsolete"; # added 2023-10-12 498 499 openllm = throw "openllm has moved to pkgs.openllm"; # added 2021-12-31 499 500 openllm-client = throw "openllm-client has been removed, since it is abandoned due to a change in philosophy"; # added 2024-08-24
+1 -3
pkgs/top-level/python-packages.nix
··· 10934 10934 10935 10935 openapi3 = callPackage ../development/python-modules/openapi3 { }; 10936 10936 10937 - openbabel-bindings = callPackage ../development/python-modules/openbabel-bindings { 10938 - openbabel = pkgs.openbabel.override { python3 = python; }; 10939 - }; 10937 + openbabel = toPythonModule (pkgs.openbabel.override { python3 = python; }); 10940 10938 10941 10939 opencamlib = callPackage ../development/python-modules/opencamlib { }; 10942 10940