From 981670f190d41098133861ec6ee87cc8eb79d877 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 11 Jun 2026 09:46:42 +0200 Subject: [PATCH] python3Packages.pycifrw: init at 5.0.1 Python library for reading and writing CIF files https://github.com/jamesrhester/pycifrw --- .../python-modules/pycifrw/default.nix | 52 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 54 insertions(+) create mode 100644 pkgs/development/python-modules/pycifrw/default.nix diff --git a/pkgs/development/python-modules/pycifrw/default.nix b/pkgs/development/python-modules/pycifrw/default.nix new file mode 100644 index 000000000000..8ff36cd7486f --- /dev/null +++ b/pkgs/development/python-modules/pycifrw/default.nix @@ -0,0 +1,52 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + nix-update-script, + numpy, + ply, + prettytable, + setuptools, +}: + +buildPythonPackage (finalAttrs: { + pname = "pycifrw"; + version = "5.0.1"; + pyproject = true; + + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "jamesrhester"; + repo = "pycifrw"; + tag = "v${finalAttrs.version}"; + hash = "sha256-b55+Vb2H/ADl586o5ch0X4HurwsbbgDg5XS5/8QhFZM="; + }; + + preBuild = '' + make -C src Parsers + ''; + + build-system = [ setuptools ]; + + dependencies = [ + numpy + prettytable + ply + ]; + + # Requires external dictionaries (dics/DDLm/cif_mag.dic) which are not available + doCheck = false; + + pythonImportsCheck = [ "CifFile" ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Python library for reading and writing CIF files"; + homepage = "https://github.com/jamesrhester/pycifrw"; + changelog = "https://github.com/jamesrhester/pycifrw/releases/tag/${finalAttrs.src.tag}"; + license = lib.licenses.psfl; + maintainers = with lib.maintainers; [ fab ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e82b1fc240a6..0a2d66e29eb9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13742,6 +13742,8 @@ self: super: with self; { pychromecast = callPackage ../development/python-modules/pychromecast { }; + pycifrw = callPackage ../development/python-modules/pycifrw { }; + pycketcasts = callPackage ../development/python-modules/pycketcasts { }; pyclibrary = callPackage ../development/python-modules/pyclibrary { };