Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / laszip / default.nix
blob85187d08f99ff9ae2cdb8c3e1d7fbd9490002495
1 { lib
2 , stdenv
3 , buildPythonPackage
4 , fetchFromGitHub
5 , fetchpatch
6 , scikit-build-core
7 , pybind11
8 , cmake
9 , LASzip
10 , ninja
11 , pythonOlder
14 buildPythonPackage rec {
15   pname = "laszip-python";
16   version = "0.2.3";
17   format = "pyproject";
19   disabled = pythonOlder "3.7";
21   src = fetchFromGitHub {
22     owner = "tmontaigu";
23     repo = pname;
24     rev = version;
25     hash = "sha256-MiPzL9TDCf1xnCv7apwdfcpkFnBRi4PO/atTQxqL8cw=";
26   };
28   patches = [
29     # Removes depending on the cmake and ninja PyPI packages, since we can pass
30     # in the tools directly, and scikit-build-core can use them.
31     # https://github.com/tmontaigu/laszip-python/pull/9
32     (fetchpatch {
33       name = "remove-cmake-ninja-pypi-dependencies.patch";
34       url = "https://github.com/tmontaigu/laszip-python/commit/17e648d04945fa2d095d6d74d58c790a4fcde84a.patch";
35       hash = "sha256-k58sS1RqVzT1WPh2OVt/D4Y045ODtj6U3bUjegd44VY=";
36     })
37   ];
39   env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-std=c++17";
41   nativeBuildInputs = [
42     cmake
43     ninja
44     pybind11
45     scikit-build-core
46   ] ++ scikit-build-core.optional-dependencies.pyproject;
48   dontUseCmakeConfigure = true;
50   buildInputs = [
51     LASzip
52   ];
54   # There are no tests
55   doCheck = false;
57   pythonImportsCheck = [ "laszip" ];
59   meta = with lib; {
60     description = "Unofficial bindings between Python and LASzip made using pybind11";
61     homepage = "https://github.com/tmontaigu/laszip-python";
62     changelog = "https://github.com/tmontaigu/laszip-python/blob/${src.rev}/Changelog.md";
63     license = licenses.mit;
64     maintainers = with maintainers; [ matthewcroughan ];
65   };