Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.6 kB · 84 lines
Nix
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485{ stdenv, lib, fetchFromGitHub, cmake, perl, zlib, libxml2, eigen, python3, cairo, pkg-config, swig, rapidjson, boost, maeparser, coordgenlibs,}:
stdenv.mkDerivation rec { pname = "openbabel"; version = "unstable-06-12-23";
src = fetchFromGitHub { owner = "openbabel"; repo = pname; rev = "32cf131444c1555c749b356dab44fb9fe275271f"; hash = "sha256-V0wrZVrojCZ9Knc5H6cPzPoYWVosRZ6Sn4PX+UFEfHY="; };
postPatch = '' sed '1i#include <ctime>' -i include/openbabel/obutil.h # gcc12 '';
buildInputs = [ perl zlib libxml2 eigen python3 cairo rapidjson boost maeparser coordgenlibs ];
nativeBuildInputs = [ cmake swig pkg-config ];
preConfigure = '' cmakeFlagsArray+=( "-DRUN_SWIG=ON" "-DPYTHON_BINDINGS=ON" "-DPYTHON_INSTDIR=$out/${python3.sitePackages}" ) '';
# Setuptools only accepts PEP 440 version strings. The "unstable" identifier # can not be used. Instead we pretend to be the 3.2 beta release. postFixup = '' cat << EOF > $out/${python3.sitePackages}/setup.py from setuptools import setup
setup( name = 'pyopenbabel', version = '3.2b1', packages = ['openbabel'], package_data = {'openbabel' : ['_openbabel.so']} ) EOF '';
meta = with lib; { description = "Toolbox designed to speak the many languages of chemical data"; homepage = "http://openbabel.org"; platforms = platforms.all; license = licenses.gpl2Plus; maintainers = with maintainers; [ danielbarter ]; };}