depot/third_party/nixpkgs/pkgs/development/libraries/openbabel/2.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

39 lines
1.1 KiB
Nix

{stdenv, lib, fetchFromGitHub, fetchpatch, cmake, zlib, libxml2, eigen, python3, cairo, pcre, pkg-config }:
stdenv.mkDerivation rec {
pname = "openbabel";
version = "2.4.1";
src = fetchFromGitHub {
owner = "openbabel";
repo = "openbabel";
rev = "openbabel-${lib.replaceStrings ["."] ["-"] version}";
sha256 = "sha256-+pXsWMzex7rB1mm6dnTHzAcyw9jImgx1OZuLeCvbeJ0=";
};
patches = [
# ARM / AArch64 fixes.
(fetchpatch {
url = "https://github.com/openbabel/openbabel/commit/ee11c98a655296550710db1207b294f00e168216.patch";
sha256 = "0wjqjrkr4pfirzzicdvlyr591vppydk572ix28jd2sagnfnf566g";
})
];
postPatch = ''
sed '1i#include <ctime>' -i include/openbabel/obutil.h # gcc12
'';
buildInputs = [ zlib libxml2 eigen python3 cairo pcre ];
cmakeFlags = [ "-DCMAKE_CXX_STANDARD=14" ];
nativeBuildInputs = [ cmake pkg-config ];
meta = with lib; {
description = "Toolbox designed to speak the many languages of chemical data";
homepage = "http://openbabel.org";
platforms = platforms.all;
maintainers = with maintainers; [ danielbarter ];
license = licenses.gpl2Plus;
};
}