mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-30 17:43:42 +00:00
e12f4db556
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>
28 lines
888 B
Nix
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 ];
|
|
};
|
|
}
|