nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 hatchling,
8
9 # depenencies
10 laszip,
11 lazrs,
12 numpy,
13
14 # tests
15 pytestCheckHook,
16}:
17
18buildPythonPackage (finalAttrs: {
19 pname = "laspy";
20 version = "2.7.0";
21 pyproject = true;
22
23 src = fetchFromGitHub {
24 owner = "laspy";
25 repo = "laspy";
26 tag = finalAttrs.version;
27 hash = "sha256-/wvwUE+lzBgAZVtLB05Fpuq0ElajMxWqCIa1Y3sjB5k=";
28 };
29
30 build-system = [ hatchling ];
31
32 dependencies = [
33 numpy
34 laszip
35 lazrs # much faster laz reading, see https://laspy.readthedocs.io/en/latest/installation.html#laz-support
36 ];
37
38 pythonImportsCheck = [
39 "laspy"
40 # `laspy` supports multiple backends and detects them dynamically.
41 # We check their importability to make sure they are all working.
42 "laszip"
43 "lazrs"
44 ];
45
46 nativeCheckInputs = [
47 pytestCheckHook
48 ];
49
50 meta = {
51 description = "Interface for reading/modifying/creating .LAS LIDAR files";
52 mainProgram = "laspy";
53 homepage = "https://github.com/laspy/laspy";
54 changelog = "https://github.com/laspy/laspy/blob/${finalAttrs.version}/CHANGELOG.md";
55 license = lib.licenses.bsd2;
56 maintainers = with lib.maintainers; [ matthewcroughan ];
57 teams = [ lib.teams.geospatial ];
58 };
59})