about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOPNA2608 <christoph.neidahl@gmail.com>2023-03-28 16:01:28 +0200
committerOPNA2608 <christoph.neidahl@gmail.com>2023-03-28 16:01:28 +0200
commit1869674090060486b671f8d98c144fb6b1cabe8b (patch)
tree9fe0d37d4ca7f1725079796f987df27395308dd5
parent406e24aa197caad8ecb1e417615761520a8b928b (diff)
corrscope: Add meta.mainProgram & version test
-rw-r--r--pkgs/applications/video/corrscope/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/applications/video/corrscope/default.nix b/pkgs/applications/video/corrscope/default.nix
index d84d86436a837..36878980b0481 100644
--- a/pkgs/applications/video/corrscope/default.nix
+++ b/pkgs/applications/video/corrscope/default.nix
@@ -5,6 +5,8 @@
 , wrapQtAppsHook
 , ffmpeg
 , qtbase
+, testers
+, corrscope
 }:
 
 mkDerivationWith python3Packages.buildPythonApplication rec {
@@ -57,6 +59,14 @@ mkDerivationWith python3Packages.buildPythonApplication rec {
     )
   '';
 
+  passthru.tests.version = testers.testVersion {
+    package = corrscope;
+    # Tries writing to
+    # - $HOME/.local/share/corrscope on Linux
+    # - $HOME/Library/Application Support/corrscope on Darwin
+    command = "env HOME=$TMPDIR ${lib.getExe corrscope} --version";
+  };
+
   meta = with lib; {
     description = "Render wave files into oscilloscope views, featuring advanced correlation-based triggering algorithm";
     longDescription = ''
@@ -70,5 +80,6 @@ mkDerivationWith python3Packages.buildPythonApplication rec {
     license = licenses.bsd2;
     maintainers = with maintainers; [ OPNA2608 ];
     platforms = platforms.all;
+    mainProgram = "corr";
   };
 }