fluffychat: 1.22.1 -> 1.23.0 (#364091)
[NixPkgs.git] / pkgs / development / python-modules / laszip / default.nix
blob461102cc69db75d1fae68425fd14358da385bbfd
2   lib,
3   stdenv,
4   buildPythonPackage,
5   fetchFromGitHub,
6   fetchpatch,
7   scikit-build-core,
8   pybind11,
9   cmake,
10   laszip,
11   ninja,
12   pythonOlder,
15 buildPythonPackage rec {
16   pname = "laszip-python";
17   version = "0.2.3";
18   format = "pyproject";
20   disabled = pythonOlder "3.7";
22   src = fetchFromGitHub {
23     owner = "tmontaigu";
24     repo = pname;
25     rev = version;
26     hash = "sha256-MiPzL9TDCf1xnCv7apwdfcpkFnBRi4PO/atTQxqL8cw=";
27   };
29   patches = [
30     # Removes depending on the cmake and ninja PyPI packages, since we can pass
31     # in the tools directly, and scikit-build-core can use them.
32     # https://github.com/tmontaigu/laszip-python/pull/9
33     (fetchpatch {
34       name = "remove-cmake-ninja-pypi-dependencies.patch";
35       url = "https://github.com/tmontaigu/laszip-python/commit/17e648d04945fa2d095d6d74d58c790a4fcde84a.patch";
36       hash = "sha256-k58sS1RqVzT1WPh2OVt/D4Y045ODtj6U3bUjegd44VY=";
37     })
38   ];
40   env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-std=c++17";
42   nativeBuildInputs = [
43     cmake
44     ninja
45     pybind11
46     scikit-build-core
47   ];
49   dontUseCmakeConfigure = true;
51   buildInputs = [ laszip ];
53   # There are no tests
54   doCheck = false;
56   pythonImportsCheck = [ "laszip" ];
58   meta = with lib; {
59     description = "Unofficial bindings between Python and LASzip made using pybind11";
60     homepage = "https://github.com/tmontaigu/laszip-python";
61     changelog = "https://github.com/tmontaigu/laszip-python/blob/${src.rev}/Changelog.md";
62     license = licenses.mit;
63     maintainers = with maintainers; [ matthewcroughan ];
64   };