about summary refs log tree commit diff
path: root/pkgs/applications/logging
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@sap.com>2022-04-27 13:18:37 +0200
committerSandro Jäckel <sandro.jaeckel@sap.com>2022-04-27 15:27:00 +0200
commit73468fbcf74e06a9ed1d1a32a3245d2fc1c395ca (patch)
treeee72c543501a8f33f452934a490909017d9c9326 /pkgs/applications/logging
parent9d15d4620b0e559020f89c768d38096b22b6e58d (diff)
sosreport: init at 4.3
Diffstat (limited to 'pkgs/applications/logging')
-rw-r--r--pkgs/applications/logging/sosreport/default.nix51
1 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/applications/logging/sosreport/default.nix b/pkgs/applications/logging/sosreport/default.nix
new file mode 100644
index 0000000000000..eb4f812767ad9
--- /dev/null
+++ b/pkgs/applications/logging/sosreport/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, fetchpatch
+, gettext
+, pexpect
+}:
+
+buildPythonPackage rec {
+  pname = "sosreport";
+  version = "4.3";
+
+  src = fetchFromGitHub {
+    owner = "sosreport";
+    repo = "sos";
+    rev = version;
+    sha256 = "sha256-fLEYRRQap7xqSyUU9MAV8cxxYKydHjn8J147VTXSf78=";
+  };
+
+  patches = [
+    (fetchpatch {
+      # fix sos --help
+      url = "https://github.com/sosreport/sos/commit/ac4eb48fa35c13b99ada41540831412480babf8d.patch";
+      sha256 = "sha256-6ZRoDDZN2KkHTXOKuHTAquB/HTIUppodmx83WxxYFP0=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    gettext
+  ];
+
+  propagatedBuildInputs = [
+    pexpect
+  ];
+
+  # requires avocado-framework 94.0, latest version as of writing is 96.0
+  doCheck = false;
+
+  preCheck = ''
+    export PYTHONPATH=$PWD/tests:$PYTHONPATH
+  '';
+
+  pythonImportsCheck = [ "sos" ];
+
+  meta = with lib; {
+    description = "Unified tool for collecting system logs and other debug information";
+    homepage = "https://github.com/sosreport/sos";
+    license = licenses.gpl2Only;
+    maintainers = with maintainers; [ SuperSandro2000 ];
+  };
+}