pdal: add package tests
This commit is contained in:
parent
fabbe931ab
commit
c6e8d2b31e
@ -1,4 +1,5 @@
|
|||||||
{ lib, stdenv
|
{ lib, stdenv
|
||||||
|
, callPackage
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, cmake
|
, cmake
|
||||||
, pkg-config
|
, pkg-config
|
||||||
@ -19,14 +20,14 @@
|
|||||||
, zstd
|
, zstd
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "pdal";
|
pname = "pdal";
|
||||||
version = "2.5.6";
|
version = "2.5.6";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "PDAL";
|
owner = "PDAL";
|
||||||
repo = "PDAL";
|
repo = "PDAL";
|
||||||
rev = version;
|
rev = finalAttrs.version;
|
||||||
sha256 = "sha256-JKwa89c05EfZ/FxOkj8lYmw0o2EgSqafRDIV2mTpZ5E=";
|
sha256 = "sha256-JKwa89c05EfZ/FxOkj8lYmw0o2EgSqafRDIV2mTpZ5E=";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -102,10 +103,14 @@ stdenv.mkDerivation rec {
|
|||||||
runHook preCheck
|
runHook preCheck
|
||||||
# tests are flaky and they seem to fail less often when they don't run in
|
# tests are flaky and they seem to fail less often when they don't run in
|
||||||
# parallel
|
# parallel
|
||||||
ctest -j 1 --output-on-failure -E '^${lib.concatStringsSep "|" disabledTests}$'
|
ctest -j 1 --output-on-failure -E '^${lib.concatStringsSep "|" finalAttrs.disabledTests}$'
|
||||||
runHook postCheck
|
runHook postCheck
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru.tests = {
|
||||||
|
pdal = callPackage ./tests.nix { pdal = finalAttrs.finalPackage; };
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "PDAL is Point Data Abstraction Library. GDAL for point cloud data";
|
description = "PDAL is Point Data Abstraction Library. GDAL for point cloud data";
|
||||||
homepage = "https://pdal.io";
|
homepage = "https://pdal.io";
|
||||||
@ -113,4 +118,4 @@ stdenv.mkDerivation rec {
|
|||||||
maintainers = teams.geospatial.members;
|
maintainers = teams.geospatial.members;
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
10
pkgs/development/libraries/pdal/tests.nix
Normal file
10
pkgs/development/libraries/pdal/tests.nix
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{ runCommand, pdal }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (pdal) pname;
|
||||||
|
in
|
||||||
|
runCommand "${pname}-tests" { meta.timeout = 60; }
|
||||||
|
''
|
||||||
|
${pdal}/bin/pdal --drivers
|
||||||
|
touch $out
|
||||||
|
''
|
Loading…
Reference in New Issue
Block a user