diff --git a/pkgs/by-name/la/laszip/package.nix b/pkgs/by-name/la/laszip/package.nix index 63cac46b75223..9051a6d157508 100644 --- a/pkgs/by-name/la/laszip/package.nix +++ b/pkgs/by-name/la/laszip/package.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchFromGitHub { owner = "LASzip"; repo = "LASzip"; - rev = finalAttrs.version; + tag = finalAttrs.version; hash = "sha256-v/oLU69zqDW1o1HTlay7GDh1Kbmv1rarII2Fz5HWCqg="; }; @@ -29,7 +29,7 @@ stdenv.mkDerivation (finalAttrs: { meta = { description = "Turn quickly bulky LAS files into compact LAZ files without information loss"; homepage = "https://laszip.org"; - changelog = "https://github.com/LASzip/LASzip/releases/tag/${finalAttrs.src.rev}"; + changelog = "https://github.com/LASzip/LASzip/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.lgpl2; maintainers = [ ]; platforms = lib.platforms.unix; diff --git a/pkgs/development/python-modules/laspy/default.nix b/pkgs/development/python-modules/laspy/default.nix index 8f6d531dc69ae..b7f9fce11cef4 100644 --- a/pkgs/development/python-modules/laspy/default.nix +++ b/pkgs/development/python-modules/laspy/default.nix @@ -1,34 +1,40 @@ { lib, buildPythonPackage, - fetchPypi, - numpy, + fetchFromGitHub, + + # build-system + hatchling, + + # depenencies laszip, lazrs, - setuptools, + numpy, + + # tests pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "laspy"; version = "2.7.0"; pyproject = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-9W/rVEXnXW/xLugUqrajUzkpDnUmT/J3xr9VPzAlo/U="; + src = fetchFromGitHub { + owner = "laspy"; + repo = "laspy"; + tag = finalAttrs.version; + hash = "sha256-/wvwUE+lzBgAZVtLB05Fpuq0ElajMxWqCIa1Y3sjB5k="; }; - nativeBuildInputs = [ setuptools ]; + build-system = [ hatchling ]; - propagatedBuildInputs = [ + dependencies = [ numpy laszip lazrs # much faster laz reading, see https://laspy.readthedocs.io/en/latest/installation.html#laz-support ]; - nativeCheckInputs = [ pytestCheckHook ]; - pythonImportsCheck = [ "laspy" # `laspy` supports multiple backends and detects them dynamically. @@ -37,13 +43,17 @@ buildPythonPackage rec { "lazrs" ]; + nativeCheckInputs = [ + pytestCheckHook + ]; + meta = { description = "Interface for reading/modifying/creating .LAS LIDAR files"; mainProgram = "laspy"; homepage = "https://github.com/laspy/laspy"; - changelog = "https://github.com/laspy/laspy/blob/${version}/CHANGELOG.md"; + changelog = "https://github.com/laspy/laspy/blob/${finalAttrs.version}/CHANGELOG.md"; license = lib.licenses.bsd2; maintainers = with lib.maintainers; [ matthewcroughan ]; teams = [ lib.teams.geospatial ]; }; -} +}) diff --git a/pkgs/development/python-modules/laszip/default.nix b/pkgs/development/python-modules/laszip/default.nix index fa9a57c1d9db9..50bc114b7f7ec 100644 --- a/pkgs/development/python-modules/laszip/default.nix +++ b/pkgs/development/python-modules/laszip/default.nix @@ -1,42 +1,31 @@ { lib, - stdenv, buildPythonPackage, fetchFromGitHub, - fetchpatch, + + # build-system scikit-build-core, pybind11, cmake, - laszip, ninja, + + # buildInputs + laszip, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "laszip-python"; - version = "0.2.3"; + version = "0.3.0"; pyproject = true; src = fetchFromGitHub { owner = "tmontaigu"; repo = "laszip-python"; - rev = version; - hash = "sha256-MiPzL9TDCf1xnCv7apwdfcpkFnBRi4PO/atTQxqL8cw="; + tag = finalAttrs.version; + hash = "sha256-fg9Joe5iDNT4w2j+zQuQIoxyAYpCAgLwhuqsBsJn6lU="; }; - patches = [ - # Removes depending on the cmake and ninja PyPI packages, since we can pass - # in the tools directly, and scikit-build-core can use them. - # https://github.com/tmontaigu/laszip-python/pull/9 - (fetchpatch { - name = "remove-cmake-ninja-pypi-dependencies.patch"; - url = "https://github.com/tmontaigu/laszip-python/commit/17e648d04945fa2d095d6d74d58c790a4fcde84a.patch"; - hash = "sha256-k58sS1RqVzT1WPh2OVt/D4Y045ODtj6U3bUjegd44VY="; - }) - ]; - - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-std=c++17"; - - nativeBuildInputs = [ + build-system = [ cmake ninja pybind11 @@ -55,8 +44,8 @@ buildPythonPackage rec { meta = { description = "Unofficial bindings between Python and LASzip made using pybind11"; homepage = "https://github.com/tmontaigu/laszip-python"; - changelog = "https://github.com/tmontaigu/laszip-python/blob/${src.rev}/Changelog.md"; + changelog = "https://github.com/tmontaigu/laszip-python/blob/${finalAttrs.src.tag}/Changelog.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ matthewcroughan ]; }; -} +}) diff --git a/pkgs/development/python-modules/py3dtiles/default.nix b/pkgs/development/python-modules/py3dtiles/default.nix index 8a8ccfa66db1c..3363e45102b07 100644 --- a/pkgs/development/python-modules/py3dtiles/default.nix +++ b/pkgs/development/python-modules/py3dtiles/default.nix @@ -1,6 +1,5 @@ { lib, - fetchpatch2, fetchFromGitLab, addBinToPathHook, @@ -47,21 +46,17 @@ buildPythonPackage (finalAttrs: { hash = "sha256-m8c+g9XXbg9OSC+NNoQkw4RKXvNFRIPWkDjAs6oH3kc="; }; - patches = [ - # Remove in the next version - # Patch to avoid using pythonRelaxDeps - (fetchpatch2 { - url = "https://gitlab.com/py3dtiles/py3dtiles/-/commit/0f60691434b9ad4afebec29b2eedfcbbe0b8420d.patch"; - includes = [ "pyproject.toml" ]; - hash = "sha256-TLoKeltI1xxSONX0uu56HKl2fXzAp1ufunsBPRr5Pus="; - }) - ]; - build-system = [ setuptools setuptools-scm ]; + pythonRelaxDeps = [ + "mapbox_earcut" + "numba" + "numpy" + "pyzmq" + ]; dependencies = [ lz4 mapbox-earcut