From 7a9c3739a41fa5cc5e5050a91d1945f3628ba2ce Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Tue, 21 Aug 2018 21:11:44 +0000 Subject: [PATCH 1/2] LAStools: init at 180812 --- .../libraries/LAStools/default.nix | 23 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 pkgs/development/libraries/LAStools/default.nix diff --git a/pkgs/development/libraries/LAStools/default.nix b/pkgs/development/libraries/LAStools/default.nix new file mode 100644 index 000000000000..ef0fd4818f5d --- /dev/null +++ b/pkgs/development/libraries/LAStools/default.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchFromGitHub, cmake, fetchurl}: +stdenv.mkDerivation rec { + + version = "180812"; + name = "LAStools-${version}"; + + src = fetchFromGitHub { + owner = "LAStools"; + repo = "LAStools"; + rev = "162cf032f25cac492712a8568a08b224a5fb40c2"; + sha256 = "117c9csbfwsx424ha695l7d99cswi316k8q338mzk1lxlk8p3xbz"; + }; + + nativeBuildInputs = [cmake]; + + meta = { + description = "Efficient tools for LiDAR processing."; + homepage = https://www.laszip.org; + license = stdenv.lib.licenses.lgpl2; + maintainers = [ stdenv.lib.maintainers.mpickering ]; + platforms = stdenv.lib.platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 04579795c56a..2fe2de7bad54 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13461,6 +13461,8 @@ in lasso = callPackage ../development/libraries/lasso { }; + LAStools = callPackage ../development/libraries/LAStools { }; + LASzip = callPackage ../development/libraries/LASzip { }; LASzip2 = callPackage ../development/libraries/LASzip/LASzip2.nix { }; From 7ab97fdc443c20326b70b99a9a7eae49c27a58c1 Mon Sep 17 00:00:00 2001 From: StephenWithPH Date: Mon, 9 Nov 2020 16:59:03 -0800 Subject: [PATCH 2/2] LAStools: 180812 -> 201003 --- .../libraries/LAStools/default.nix | 36 ++++++++++++------- .../libraries/LAStools/drop-64-suffix.patch | 13 +++++++ 2 files changed, 36 insertions(+), 13 deletions(-) create mode 100644 pkgs/development/libraries/LAStools/drop-64-suffix.patch diff --git a/pkgs/development/libraries/LAStools/default.nix b/pkgs/development/libraries/LAStools/default.nix index ef0fd4818f5d..c231361acb55 100644 --- a/pkgs/development/libraries/LAStools/default.nix +++ b/pkgs/development/libraries/LAStools/default.nix @@ -1,23 +1,33 @@ -{ stdenv, fetchFromGitHub, cmake, fetchurl}: -stdenv.mkDerivation rec { +{ stdenv, fetchFromGitHub, cmake }: - version = "180812"; - name = "LAStools-${version}"; +stdenv.mkDerivation rec { + pname = "LAStools"; + version = "201003"; # LAStools makes release-ish commits with a message containing their version number as YYMMDD; these align with their website changelog src = fetchFromGitHub { owner = "LAStools"; repo = "LAStools"; - rev = "162cf032f25cac492712a8568a08b224a5fb40c2"; - sha256 = "117c9csbfwsx424ha695l7d99cswi316k8q338mzk1lxlk8p3xbz"; + rev = "635b76b42cc4912762da31b92f875df5310e1714"; + sha256 = "0682ca3bp51lmfp46vsjnd1bqpn05g95pf4kclvjv1y8qivkxsaq"; }; - nativeBuildInputs = [cmake]; + patches = [ + ./drop-64-suffix.patch # necessary to prevent '64' from being appended to the names of the executables + ]; - meta = { - description = "Efficient tools for LiDAR processing."; - homepage = https://www.laszip.org; - license = stdenv.lib.licenses.lgpl2; - maintainers = [ stdenv.lib.maintainers.mpickering ]; - platforms = stdenv.lib.platforms.unix; + hardeningDisable = [ + "format" + ]; + + nativeBuildInputs = [ + cmake + ]; + + meta = with stdenv.lib; { + description = "Software for rapid LiDAR processing"; + homepage = http://lastools.org/; + license = licenses.unfree; + maintainers = with maintainers; [ stephenwithph ]; + platforms = platforms.unix; }; } diff --git a/pkgs/development/libraries/LAStools/drop-64-suffix.patch b/pkgs/development/libraries/LAStools/drop-64-suffix.patch new file mode 100644 index 000000000000..2090baeb3b2b --- /dev/null +++ b/pkgs/development/libraries/LAStools/drop-64-suffix.patch @@ -0,0 +1,13 @@ +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -32,6 +32,6 @@ endforeach(TARGET) + foreach(TARGET ${ALL_TARGETS}) + target_link_libraries(${TARGET} LASlib) + set_target_properties(${TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../bin64) +- set_target_properties(${TARGET} PROPERTIES OUTPUT_NAME ${TARGET}64) ++ set_target_properties(${TARGET} PROPERTIES OUTPUT_NAME ${TARGET}) + install(TARGETS ${TARGET} RUNTIME DESTINATION bin) + endforeach(TARGET) +-- +2.28.0 +