mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-04 14:00:04 +00:00
56 lines
820 B
Nix
56 lines
820 B
Nix
{
|
|
python,
|
|
buildPythonPackage,
|
|
rustPlatform,
|
|
pkg-config,
|
|
bzip2,
|
|
zstd,
|
|
pytestCheckHook,
|
|
|
|
ironcalc,
|
|
}:
|
|
|
|
buildPythonPackage {
|
|
pname = "ironcalc";
|
|
inherit (ironcalc) src version;
|
|
pyproject = true;
|
|
|
|
postPatch = ''
|
|
cd bindings/python
|
|
'';
|
|
|
|
__structuredAttrs = true;
|
|
|
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
|
inherit (ironcalc) src;
|
|
hash = ironcalc.cargoHash;
|
|
};
|
|
|
|
cargoRoot = "../..";
|
|
|
|
env.PYO3_PYTHON = "${python}/bin/python3";
|
|
|
|
nativeBuildInputs = [
|
|
rustPlatform.cargoSetupHook
|
|
rustPlatform.maturinBuildHook
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
bzip2
|
|
zstd
|
|
];
|
|
|
|
doCheck = true;
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [ "ironcalc" ];
|
|
|
|
meta = ironcalc.meta // {
|
|
description = "Python bindings for IronCalc";
|
|
};
|
|
}
|