13 stdenv.mkDerivation (attrs: {
17 src = fetchFromGitHub {
20 rev = "v${attrs.version}";
21 hash = "sha256-qWTN033YU4iWzt+mXQaP5W/6IF5nebF4PwNVkyL8wTg=";
28 ] ++ lib.optional withPython python.pkgs.pythonImportsCheckHook;
33 ] ++ lib.optional withPython python;
35 # libSBML doesn't always make use of pkg-config
37 "-DLIBXML_INCLUDE_DIR=${lib.getDev libxml2}/include/libxml2"
38 "-DLIBXML_LIBRARY=${lib.getLib libxml2}/lib/libxml2${stdenv.hostPlatform.extensions.sharedLibrary}"
39 "-DPKG_CONFIG_EXECUTABLE=${lib.getBin pkg-config}/bin/pkg-config"
40 "-DSWIG_EXECUTABLE=${lib.getBin swig}/bin/swig"
41 ] ++ lib.optional withPython "-DWITH_PYTHON=ON";
43 postInstall = lib.optional withPython ''
44 mv $out/${python.sitePackages}/libsbml/libsbml.py $out/${python.sitePackages}/libsbml/__init__.py
47 pythonImportsCheck = [ "libsbml" ];
50 description = "Library for manipulating Systems Biology Markup Language (SBML)";
51 homepage = "https://github.com/sbmlteam/libsbml";
52 license = licenses.lgpl21Only;
53 maintainers = [ maintainers.kupac ];
54 platforms = platforms.all;