about summary refs log tree commit diff
path: root/pkgs/tools/system
diff options
context:
space:
mode:
authorfigsoda <figsoda@pm.me>2023-06-22 22:36:19 -0400
committerfigsoda <figsoda@pm.me>2023-06-22 22:38:46 -0400
commit1780a3baa9fb68572ae68076d1acee25545cd23e (patch)
treef0f897261c4e826706ae57cc90dfeddb535bb5d4 /pkgs/tools/system
parentfff82404c8f28eb52be539aecab51fa4767d79f0 (diff)
dool: init at 1.2.0
https://github.com/scottchiefbaker/dool
Diffstat (limited to 'pkgs/tools/system')
-rw-r--r--pkgs/tools/system/dool/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/tools/system/dool/default.nix b/pkgs/tools/system/dool/default.nix
new file mode 100644
index 0000000000000..c2cde5e9569cd
--- /dev/null
+++ b/pkgs/tools/system/dool/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dool";
+  version = "1.2.0";
+
+  src = fetchFromGitHub {
+    owner = "scottchiefbaker";
+    repo = "dool";
+    rev = "v${version}";
+    hash = "sha256-e6gLPmxOZBw6htiJ5Ljob2tQ9xB4kjK8vPs/9WMGER4=";
+  };
+
+  buildInputs = [
+    python3
+  ];
+
+  makeFlags = [
+    "prefix=$(out)"
+  ];
+
+  # fix the plugins directory
+  postPatch = ''
+    substituteInPlace dool \
+      --replace \
+        "os.path.abspath(os.path.dirname(sys.argv[0])) + '/plugins/'" \
+        "'$out/share/dool/'"
+  '';
+
+  meta = with lib; {
+    description = "Python3 compatible clone of dstat";
+    homepage = "https://github.com/scottchiefbaker/dool";
+    changelog = "https://github.com/scottchiefbaker/dool/blob/${src.rev}/ChangeLog";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ figsoda ];
+    platforms = platforms.unix;
+  };
+}