3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/openbabel-bindings/default.nix
Anders Kaseorg e12f4db556 treewide: Fix unsafe concatenation of $LD_LIBRARY_PATH, round 2
Naive concatenation of $LD_LIBRARY_PATH can result in an empty
colon-delimited segment; this tells glibc to load libraries from the
current directory, which is definitely wrong, and may be a security
vulnerability if the current directory is untrusted.  (See #67234, for
example.)  Fix this throughout the tree.

Followup to #76804.  Fixes #144646.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2021-11-04 16:15:05 -07:00

28 lines
888 B
Nix

{ 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 = "${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 ];
};
}