Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkgs/by-name/la/laszip/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ stdenv.mkDerivation (finalAttrs: {
src = fetchFromGitHub {
owner = "LASzip";
repo = "LASzip";
rev = finalAttrs.version;
tag = finalAttrs.version;
hash = "sha256-v/oLU69zqDW1o1HTlay7GDh1Kbmv1rarII2Fz5HWCqg=";
};

Expand All @@ -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;
Expand Down
36 changes: 23 additions & 13 deletions pkgs/development/python-modules/laspy/default.nix
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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 ];
};
}
})
35 changes: 12 additions & 23 deletions pkgs/development/python-modules/laszip/default.nix
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 ];
};
}
})
17 changes: 6 additions & 11 deletions pkgs/development/python-modules/py3dtiles/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
lib,
fetchpatch2,
fetchFromGitLab,
addBinToPathHook,

Expand Down Expand Up @@ -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
Expand Down
Loading