e57inspector: init at 0.3.1 (#518719)

This commit is contained in:
Niklas Hambüchen
2026-05-31 12:06:43 +00:00
committed by GitHub
3 changed files with 120 additions and 0 deletions
+1
View File
@@ -494,6 +494,7 @@ in
drupal = runTest ./drupal.nix;
dublin-traceroute = runTest ./dublin-traceroute.nix;
dwl = runTestOn [ "x86_64-linux" "aarch64-linux" ] ./dwl.nix;
e57inspector = runTest ./e57inspector.nix;
early-mount-options = runTest ./early-mount-options.nix;
earlyoom = runTestOn [ "x86_64-linux" ] ./earlyoom.nix;
easytier = runTest ./easytier.nix;
+38
View File
@@ -0,0 +1,38 @@
{ pkgs, ... }:
{
name = "e57inspector";
meta.maintainers = with pkgs.lib.maintainers; [
nh2
chpatrick
];
nodes.machine =
{ ... }:
{
imports = [
./common/x11.nix
];
services.xserver.enable = true;
environment.systemPackages = [
pkgs.e57inspector
pkgs.xdotool
];
};
testScript =
let
testFile = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/asmaloney/libE57Format-test-data/bbcacec05d60f923869545c5eab33d94c390d50e/self/ColouredCubeFloat.e57";
hash = "sha256-bb95crNYvX3Qhkx4k6Sqe2GjOf1u4nxxswMfdjyXfTM=";
};
in
''
start_all()
machine.wait_for_x()
machine.execute("e57inspector ${testFile} >&2 &")
machine.wait_until_succeeds("xdotool search --pid $(pidof .e57inspector-wrapped)")
machine.screenshot("screen")
'';
}
+81
View File
@@ -0,0 +1,81 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
qt6,
xercesc,
nixosTests,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "e57inspector";
version = "0.3.1";
src = fetchFromGitHub {
owner = "sisakat";
repo = "e57inspector";
tag = "v${finalAttrs.version}";
hash = "sha256-McLPbvS7j+6UVEcQ34/ngGiCxsdF/Whs5wZt5cP2UkI=";
fetchSubmodules = true;
};
strictDeps = true;
__structuredAttrs = true;
patches = [
# Support loading E57 files from CLI arguments,
# so we can use that in the NixOS VM test to load a sample file.
# Remove with next release (see https://github.com/sisakat/e57inspector/pull/8)
(fetchpatch {
name = "e57inspector-Allow-loading-file-from-CLI.patch";
url = "https://github.com/nh2/e57inspector/commit/a5a899ee58952ffc2971d18b3734ea405e0020f3.patch";
hash = "sha256-QRUv0CvX+OdH88CzI/6XjPXnAVIsf6N/Ix/qqCsSaRw=";
})
];
postPatch = ''
# Fix cmake_minimum_required version compatibility with CMake >= 4.0
substituteInPlace app/cmake/gitversion.cmake \
--replace-fail "cmake_minimum_required(VERSION 3.0.0)" "cmake_minimum_required(VERSION 3.5)"
'';
nativeBuildInputs = [
cmake
qt6.wrapQtAppsHook
];
buildInputs = [
qt6.qtbase
qt6.qttools
xercesc
];
# Upstream CMakeLists.txt has no install() rules.
installPhase = ''
runHook preInstall
install -Dm755 app/e57inspector -t $out/bin
install -Dm755 panorama/e57inspector_panorama -t $out/bin
runHook postInstall
'';
passthru.tests = {
e57inspector = nixosTests.e57inspector;
};
meta = {
description = "Cross-platform E57 file viewer to list and view stored point clouds, images and metadata";
homepage = "https://github.com/sisakat/e57inspector";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [
nh2
chpatrick
];
teams = [ lib.teams.geospatial ];
platforms = lib.platforms.linux;
mainProgram = "e57inspector";
};
})