about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/openbabel-bindings/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/openbabel-bindings/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/openbabel-bindings/default.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/openbabel-bindings/default.nix b/nixpkgs/pkgs/development/python-modules/openbabel-bindings/default.nix
new file mode 100644
index 000000000000..18a6a8dd032c
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/openbabel-bindings/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, lib, openbabel, python, buildPythonPackage }:
+
+buildPythonPackage rec {
+  pname = "openbabel";
+  version = "3.1.1";
+
+  src = "${openbabel}/lib/python${python.sourceVersion.major}.${python.sourceVersion.minor}/site-packages";
+
+  nativeBuildInputs = [ openbabel ];
+
+  # these env variables are used by the bindings to find libraries
+  # they need to be included explicitly in your nix-shell for
+  # some functionality to work (inparticular, pybel).
+  # see https://openbabel.org/docs/dev/Installation/install.html
+  BABEL_LIBDIR = "${openbabel}/lib/openbabel/3.1.0";
+  LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:${openbabel}/lib";
+
+  doCheck = false;
+  pythonImportsCheck = [ "openbabel" ];
+
+  meta = with lib; {
+    homepage = "http://openbabel.org/wiki/Main_Page";
+    description = "Python bindings for openbabel";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ danielbarter ];
+  };
+}