Merge pull request #330184 from natsukium/freesasa/init

freesasa: init at 2.1.2; python312Packages.freesasa: init at 2.2.1
This commit is contained in:
OTABI Tomoya
2024-08-23 09:21:46 +09:00
committed by GitHub
3 changed files with 111 additions and 0 deletions
+60
View File
@@ -0,0 +1,60 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
autoreconfHook,
libtool,
pkg-config,
libxml2,
json_c,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "freesasa";
version = "2.1.2";
src = fetchFromGitHub {
owner = "mittinatten";
repo = "freesasa";
rev = "refs/tags/${finalAttrs.version}";
fetchSubmodules = true;
hash = "sha256-OH1/GGFtMBnHuoOu3pdR+ohVO1m0I/jmCZbxPQ0C0jo=";
};
patches = [
(fetchpatch {
# https://github.com/mittinatten/freesasa/issues/85
name = "fix-linker-error.patch";
url = "https://github.com/mittinatten/freesasa/commit/d5898c13af0f272697726c567a22f1c48af53d62.patch";
includes = [ "src/Makefile.am" ];
hash = "sha256-NA4jMue9ATxP+A0tYIptwz0qCXTmAqoMRBsi5d5uv3E=";
})
];
nativeBuildInputs = [
autoreconfHook
libtool
pkg-config
];
buildInputs = [
json_c
libxml2
];
passthru.tests = {
version = testers.testVersion { package = finalAttrs.finalPackage; };
};
meta = {
description = "C-library for calculating Solvent Accessible Surface Areas";
homepage = "https://github.com/mittinatten/freesasa";
changelog = "https://github.com/mittinatten/freesasa/blob/${finalAttrs.src.rev}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ natsukium ];
mainProgram = "freesasa";
platforms = lib.platforms.unix;
};
})
@@ -0,0 +1,47 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
cython,
freesasa,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "freesasa";
version = "2.2.1";
pyproject = true;
src = fetchFromGitHub {
owner = "freesasa";
repo = "freesasa-python";
rev = "refs/tags/v${version}";
hash = "sha256-/7ymItwXOemY0+IL0k6rWnJI8fAwTFjNXzTV+uf9x9A=";
};
postPatch = ''
ln -s ${freesasa.src}/* lib/
'';
build-system = [
cython
setuptools
];
env.USE_CYTHON = true;
pythonImportsCheck = [ "freesasa" ];
nativeCheckInputs = [ pytestCheckHook ];
pytestFlagsArray = [ "test.py" ];
meta = {
description = "FreeSASA Python Module";
homepage = "https://github.com/freesasa/freesasa-python";
changelog = "https://github.com/freesasa/freesasa-python/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ natsukium ];
};
}
+4
View File
@@ -4705,6 +4705,10 @@ self: super: with self; {
freertos-gdb = callPackage ../development/python-modules/freertos-gdb { };
freesasa = callPackage ../development/python-modules/freesasa {
inherit (pkgs) freesasa;
};
freetype-py = callPackage ../development/python-modules/freetype-py { };
freezegun = callPackage ../development/python-modules/freezegun { };