1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00

gemmi: init at 0.6.6

https://github.com/project-gemmi/gemmi
This commit is contained in:
natsukium 2024-07-05 10:44:22 +09:00
parent d2a6a829ad
commit e9060eb029
No known key found for this signature in database
GPG key ID: 9EA45A31DB994C53
2 changed files with 69 additions and 0 deletions

View file

@ -0,0 +1,64 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
zlib,
enablePython ? true,
python3Packages,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "gemmi";
version = "0.6.6";
src = fetchFromGitHub {
owner = "project-gemmi";
repo = "gemmi";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-S31oCp6kLSYgmRaW7Q9/dMhjJ5Y0sK3WPpg2/ZMPyMg=";
};
nativeBuildInputs =
[ cmake ]
++ lib.optionals enablePython (
with python3Packages;
[
pybind11
python
pythonImportsCheckHook
]
);
buildInputs = [ zlib ];
cmakeFlags = [
(lib.cmakeBool "USE_PYTHON" enablePython)
(lib.cmakeFeature "PYTHON_INSTALL_DIR" "${python3Packages.python.sitePackages}")
];
doCheck = true;
pythonImportsCheck = [ "gemmi" ];
doInstallCheck = enablePython;
nativeInstallCheckInputs = [ python3Packages.pytestCheckHook ];
pytestFlagsArray = [ "../tests" ];
passthru.tests = {
version = testers.testVersion { package = finalAttrs.finalPackage; };
};
meta = {
description = "Macromolecular crystallography library and utilities";
homepage = "https://github.com/project-gemmi/gemmi";
changelog = "https://github.com/project-gemmi/gemmi/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [ natsukium ];
mainProgram = "gemmi";
platforms = lib.platforms.unix;
};
})

View file

@ -4755,6 +4755,11 @@ self: super: with self; {
gemfileparser2 = callPackage ../development/python-modules/gemfileparser2 { };
gemmi = toPythonModule (pkgs.gemmi.override {
enablePython = true;
python3Packages = self;
});
genanki = callPackage ../development/python-modules/genanki { };
generic = callPackage ../development/python-modules/generic { };