diff options
author | László Kupcsik <koopac@gmail.com> | 2024-04-20 23:58:53 +0200 |
---|---|---|
committer | László Kupcsik <koopac@gmail.com> | 2024-05-11 07:01:11 +0200 |
commit | eff3d8d3591ef8619548abd7628847cf5ad387fa (patch) | |
tree | 7092f8fd151c7a9028470284f74132828068e50e | |
parent | f86af01dbe59f94e1114d443972d8a73acc399c2 (diff) |
libsbml: init at 5.20.2
Co-authored-by: Justin Bedő <cu@cua0.org>
-rw-r--r-- | pkgs/by-name/li/libsbml/package.nix | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/by-name/li/libsbml/package.nix b/pkgs/by-name/li/libsbml/package.nix new file mode 100644 index 000000000000..ce895beee006 --- /dev/null +++ b/pkgs/by-name/li/libsbml/package.nix @@ -0,0 +1,58 @@ +{ + lib, + stdenv, + fetchFromGitHub, + fetchpatch, + cmake, + pkg-config, + bzip2, + libxml2, + swig, +}: +stdenv.mkDerivation (attrs: { + pname = "libsbml"; + version = "5.20.2"; + + src = fetchFromGitHub { + owner = "sbmlteam"; + repo = "libsbml"; + rev = "v${attrs.version}"; + hash = "sha256-8JT2r0zuf61VewtZaOAccaOUmDlQPnllA0fXE9rT5X8="; + }; + + patches = [ + # This should be in next release, remember to remove fetchpatch + (fetchpatch { + name = "fix-xmlerror-conversion.patch"; + url = "https://github.com/sbmlteam/libsbml/pull/358.patch"; + hash = "sha256-uirG6XJ+w0hqBUEAGDnzhHoVtJVRdN1eqBYeneKMBao="; + }) + ]; + + nativeBuildInputs = [ + cmake + pkg-config + swig + ]; + + buildInputs = [ + bzip2.dev + libxml2 + ]; + + # libSBML doesn't always make use of pkg-config + cmakeFlags = [ + "-DLIBXML_INCLUDE_DIR=${lib.getDev libxml2}/include/libxml2" + "-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" + ]; + + meta = with lib; { + description = "Library for manipulating Systems Biology Markup Language (SBML)"; + homepage = "https://github.com/sbmlteam/libsbml"; + license = licenses.lgpl21Only; + maintainers = [maintainers.kupac]; + platforms = platforms.all; + }; +}) |