2023-02-21 01:19:23 +00:00
|
|
|
{ lib
|
2023-08-05 15:13:10 +00:00
|
|
|
, stdenv
|
2023-02-21 01:19:23 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, scikit-build-core
|
|
|
|
, pybind11
|
|
|
|
, cmake
|
|
|
|
, LASzip
|
2023-08-03 13:46:46 +00:00
|
|
|
, pythonOlder
|
2023-02-21 01:19:23 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "laszip-python";
|
2023-08-05 15:13:10 +00:00
|
|
|
version = "0.2.3";
|
2023-02-21 01:19:23 +00:00
|
|
|
|
|
|
|
format = "pyproject";
|
|
|
|
|
2023-08-03 13:46:46 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2023-02-21 01:19:23 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tmontaigu";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-08-05 15:13:10 +00:00
|
|
|
hash = "sha256-MiPzL9TDCf1xnCv7apwdfcpkFnBRi4PO/atTQxqL8cw=";
|
2023-02-21 01:19:23 +00:00
|
|
|
};
|
|
|
|
|
2023-08-05 15:13:10 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-std=c++17";
|
|
|
|
|
2023-02-21 01:19:23 +00:00
|
|
|
nativeBuildInputs = [
|
2023-08-03 13:46:46 +00:00
|
|
|
cmake
|
|
|
|
pybind11
|
2023-02-21 01:19:23 +00:00
|
|
|
scikit-build-core
|
|
|
|
scikit-build-core.optional-dependencies.pyproject
|
|
|
|
];
|
|
|
|
|
2023-08-03 13:46:46 +00:00
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
2023-02-21 01:19:23 +00:00
|
|
|
buildInputs = [
|
|
|
|
LASzip
|
|
|
|
];
|
|
|
|
|
|
|
|
# There are no tests
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "laszip" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Unofficial bindings between Python and LASzip made using pybind11";
|
|
|
|
homepage = "https://github.com/tmontaigu/laszip-python";
|
2023-08-03 13:46:46 +00:00
|
|
|
changelog = "https://github.com/tmontaigu/laszip-python/blob/${src.rev}/Changelog.md";
|
2023-02-21 01:19:23 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ matthewcroughan ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|