From da4f17a2a6f5baa48bd86348a7f1ecd5889e1589 Mon Sep 17 00:00:00 2001 From: matthewcroughan Date: Tue, 24 Jan 2023 22:37:16 +0000 Subject: [PATCH 1/2] laspy: init at 2.3.0 Co-authored-by: Nick Cao Co-authored-by: Sandro --- .../python-modules/laspy/default.nix | 35 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/python-modules/laspy/default.nix diff --git a/pkgs/development/python-modules/laspy/default.nix b/pkgs/development/python-modules/laspy/default.nix new file mode 100644 index 000000000000..2907e61b9d8c --- /dev/null +++ b/pkgs/development/python-modules/laspy/default.nix @@ -0,0 +1,35 @@ +{ lib +, buildPythonPackage +, fetchPypi +, numpy +, laszip +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "laspy"; + version = "2.3.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-Wdbp6kjuZkJh+pp9OVczdsRNgn41/Tdt7nGFvewcQ1w="; + }; + + propagatedBuildInputs = [ + numpy + laszip + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "laspy" "laszip" ]; + + meta = with lib; { + description = "Interface for reading/modifying/creating .LAS LIDAR files"; + homepage = "https://github.com/laspy/laspy"; + license = licenses.bsd2; + maintainers = with maintainers; [ matthewcroughan ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4e7f2e055eed..da74232300df 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5309,6 +5309,8 @@ self: super: with self; { larynx-train = callPackage ../development/python-modules/larynx-train { }; + laspy = callPackage ../development/python-modules/laspy { }; + latexcodec = callPackage ../development/python-modules/latexcodec { }; latexify-py = callPackage ../development/python-modules/latexify-py { }; From 22ba026243ef00bc49409e0b5d68811055977808 Mon Sep 17 00:00:00 2001 From: matthewcroughan Date: Tue, 21 Feb 2023 01:19:23 +0000 Subject: [PATCH 2/2] laszip: init at 0.2.1 Co-authored-by: Sandro --- .../python-modules/laszip/default.nix | 58 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 60 insertions(+) create mode 100644 pkgs/development/python-modules/laszip/default.nix diff --git a/pkgs/development/python-modules/laszip/default.nix b/pkgs/development/python-modules/laszip/default.nix new file mode 100644 index 000000000000..cefd2d5f6e1a --- /dev/null +++ b/pkgs/development/python-modules/laszip/default.nix @@ -0,0 +1,58 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, scikit-build-core +, distlib +, pytestCheckHook +, pyproject-metadata +, pathspec +, pybind11 +, cmake +, LASzip +}: + +buildPythonPackage rec { + pname = "laszip-python"; + version = "0.2.1"; + + format = "pyproject"; + + src = fetchFromGitHub { + owner = "tmontaigu"; + repo = pname; + rev = version; + sha256 = "sha256-ujKoUm2Btu25T7ZrSGqjRc3NR1qqsQU8OwHQDSx8grY="; + }; + + nativeBuildInputs = [ + scikit-build-core + scikit-build-core.optional-dependencies.pyproject + cmake + ]; + + buildInputs = [ + pybind11 + LASzip + ]; + + checkInputs = [ + pytestCheckHook + ]; + + preBuild = '' + cd .. + ''; + + # 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"; + license = licenses.mit; + maintainers = with maintainers; [ matthewcroughan ]; + }; +} + diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index da74232300df..72bfd6f5f68e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5311,6 +5311,8 @@ self: super: with self; { laspy = callPackage ../development/python-modules/laspy { }; + laszip = callPackage ../development/python-modules/laszip { }; + latexcodec = callPackage ../development/python-modules/latexcodec { }; latexify-py = callPackage ../development/python-modules/latexify-py { };