mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
libsbml: 5.20.2 -> 5.20.4 and add python support (#344137)
Changelog: https://github.com/sbmlteam/libsbml/releases/tag/v5.20.4
This commit is contained in:
parent
f08e2425f3
commit
3881e06a53
@ -2,43 +2,35 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
cmake,
|
||||
pkg-config,
|
||||
bzip2,
|
||||
libxml2,
|
||||
swig,
|
||||
python ? null,
|
||||
withPython ? false,
|
||||
}:
|
||||
stdenv.mkDerivation (attrs: {
|
||||
pname = "libsbml";
|
||||
version = "5.20.2";
|
||||
version = "5.20.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sbmlteam";
|
||||
repo = "libsbml";
|
||||
rev = "v${attrs.version}";
|
||||
hash = "sha256-8JT2r0zuf61VewtZaOAccaOUmDlQPnllA0fXE9rT5X8=";
|
||||
hash = "sha256-qWTN033YU4iWzt+mXQaP5W/6IF5nebF4PwNVkyL8wTg=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# This should be in next release, remember to remove fetchpatch
|
||||
(fetchpatch { # https://github.com/sbmlteam/libsbml/pull/358
|
||||
name = "fix-xmlerror-conversion.patch";
|
||||
url = "https://github.com/sbmlteam/libsbml/commit/de2f77ee6766fe933a1472200f5e08e7c5ba6f8c.patch";
|
||||
hash = "sha256-uirG6XJ+w0hqBUEAGDnzhHoVtJVRdN1eqBYeneKMBao=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
swig
|
||||
];
|
||||
] ++ lib.optional withPython python.pkgs.pythonImportsCheckHook;
|
||||
|
||||
buildInputs = [
|
||||
bzip2.dev
|
||||
libxml2
|
||||
];
|
||||
] ++ lib.optional withPython python;
|
||||
|
||||
# libSBML doesn't always make use of pkg-config
|
||||
cmakeFlags = [
|
||||
@ -46,13 +38,19 @@ stdenv.mkDerivation (attrs: {
|
||||
"-DLIBXML_LIBRARY=${lib.getLib libxml2}/lib/libxml2${stdenv.hostPlatform.extensions.sharedLibrary}"
|
||||
"-DPKG_CONFIG_EXECUTABLE=${lib.getBin pkg-config}/bin/pkg-config"
|
||||
"-DSWIG_EXECUTABLE=${lib.getBin swig}/bin/swig"
|
||||
];
|
||||
] ++ lib.optional withPython "-DWITH_PYTHON=ON";
|
||||
|
||||
postInstall = lib.optional withPython ''
|
||||
mv $out/${python.sitePackages}/libsbml/libsbml.py $out/${python.sitePackages}/libsbml/__init__.py
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "libsbml" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Library for manipulating Systems Biology Markup Language (SBML)";
|
||||
homepage = "https://github.com/sbmlteam/libsbml";
|
||||
license = licenses.lgpl21Only;
|
||||
maintainers = [maintainers.kupac];
|
||||
maintainers = [ maintainers.kupac ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
})
|
||||
|
@ -7132,6 +7132,10 @@ self: super: with self; {
|
||||
|
||||
libsavitar = callPackage ../development/python-modules/libsavitar { };
|
||||
|
||||
libsbml = toPythonModule (pkgs.libsbml.override {
|
||||
withPython = true;
|
||||
inherit (self) python;
|
||||
});
|
||||
|
||||
libsixel = callPackage ../development/python-modules/libsixel {
|
||||
inherit (pkgs) libsixel;
|
||||
|
Loading…
Reference in New Issue
Block a user