1 { stdenv, lib, fetchFromGitHub, cmake, zlib, libxml2, eigen, python, cairo, pcre, pkg-config, swig, rapidjson }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
10 rev = "openbabel-${lib.replaceStrings ["."] ["-"] version}";
11 sha256 = "sha256-wQpgdfCyBAoh4pmj9j7wPTlMtraJ62w/EShxi/olVMY=";
14 buildInputs = [ zlib libxml2 eigen python cairo pcre swig rapidjson ];
16 nativeBuildInputs = [ cmake pkg-config ];
18 pythonMajorMinor = "${python.sourceVersion.major}.${python.sourceVersion.minor}";
22 "-DPYTHON_BINDINGS=ON"
26 cat <<EOF > $out/lib/python$pythonMajorMinor/site-packages/setup.py
27 from distutils.core import setup
31 version = '${version}',
32 packages = ['openbabel'],
33 package_data = {'openbabel' : ['_openbabel.so']}
39 description = "A toolbox designed to speak the many languages of chemical data";
40 homepage = "http://openbabel.org";
41 platforms = platforms.all;
42 license = licenses.gpl2Plus;
43 maintainers = with maintainers; [ danielbarter ];