diff options
author | Ivan Mincik <ivan.mincik@gmail.com> | 2023-12-19 14:54:11 +0100 |
---|---|---|
committer | Ivan Mincik <ivan.mincik@gmail.com> | 2024-01-08 14:16:02 +0100 |
commit | c6e8d2b31ed1a686cbd402d713af0cae281e609d (patch) | |
tree | 6a63cf7c3d944a138e9f3d3ba6749b1747546f62 /pkgs/development/libraries/pdal | |
parent | fabbe931ab45651edc154693c7b06cc8ce171e28 (diff) |
pdal: add package tests
Diffstat (limited to 'pkgs/development/libraries/pdal')
-rw-r--r-- | pkgs/development/libraries/pdal/default.nix | 13 | ||||
-rw-r--r-- | pkgs/development/libraries/pdal/tests.nix | 10 |
2 files changed, 19 insertions, 4 deletions
diff --git a/pkgs/development/libraries/pdal/default.nix b/pkgs/development/libraries/pdal/default.nix index f96f6c64adf31..a5c3740b8721e 100644 --- a/pkgs/development/libraries/pdal/default.nix +++ b/pkgs/development/libraries/pdal/default.nix @@ -1,4 +1,5 @@ { lib, stdenv +, callPackage , fetchFromGitHub , cmake , pkg-config @@ -19,14 +20,14 @@ , zstd }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "pdal"; version = "2.5.6"; src = fetchFromGitHub { owner = "PDAL"; repo = "PDAL"; - rev = version; + rev = finalAttrs.version; sha256 = "sha256-JKwa89c05EfZ/FxOkj8lYmw0o2EgSqafRDIV2mTpZ5E="; }; @@ -102,10 +103,14 @@ stdenv.mkDerivation rec { runHook preCheck # tests are flaky and they seem to fail less often when they don't run in # parallel - ctest -j 1 --output-on-failure -E '^${lib.concatStringsSep "|" disabledTests}$' + ctest -j 1 --output-on-failure -E '^${lib.concatStringsSep "|" finalAttrs.disabledTests}$' runHook postCheck ''; + passthru.tests = { + pdal = callPackage ./tests.nix { pdal = finalAttrs.finalPackage; }; + }; + meta = with lib; { description = "PDAL is Point Data Abstraction Library. GDAL for point cloud data"; homepage = "https://pdal.io"; @@ -113,4 +118,4 @@ stdenv.mkDerivation rec { maintainers = teams.geospatial.members; platforms = platforms.all; }; -} +}) diff --git a/pkgs/development/libraries/pdal/tests.nix b/pkgs/development/libraries/pdal/tests.nix new file mode 100644 index 0000000000000..1f71626856b38 --- /dev/null +++ b/pkgs/development/libraries/pdal/tests.nix @@ -0,0 +1,10 @@ +{ runCommand, pdal }: + +let + inherit (pdal) pname; +in +runCommand "${pname}-tests" { meta.timeout = 60; } + '' + ${pdal}/bin/pdal --drivers + touch $out + '' |