about summary refs log tree commit diff
path: root/pkgs/tools/system/stacer/default.nix
diff options
context:
space:
mode:
authorMostly Void <7rat13@gmail.com>2022-08-30 21:18:31 +0530
committerMostly Void <7rat13@gmail.com>2023-07-29 23:55:52 +0200
commit789d1d4248258ae4818b718387a05397192df29e (patch)
treeea6b5d0eb86707d11099cc70c95876f037c3253e /pkgs/tools/system/stacer/default.nix
parent212f20a9071aaed1e70084f069b608502ce04651 (diff)
stacer: init at 1.1.0
Diffstat (limited to 'pkgs/tools/system/stacer/default.nix')
-rw-r--r--pkgs/tools/system/stacer/default.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/tools/system/stacer/default.nix b/pkgs/tools/system/stacer/default.nix
new file mode 100644
index 0000000000000..75068148bd74c
--- /dev/null
+++ b/pkgs/tools/system/stacer/default.nix
@@ -0,0 +1,49 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, qtcharts
+, qttools
+, wrapQtAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "stacer";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    owner = "oguzhaninan";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0qndzzkbq6abapvwq202kva8j619jdn9977sbqmmfs9zkjz4mbsd";
+  };
+
+  postPatch = ''
+    substituteInPlace stacer/Managers/app_manager.cpp \
+      --replace 'qApp->applicationDirPath() + "/translations"' \
+                'QStandardPaths::locate(QStandardPaths::AppDataLocation, "translations", QStandardPaths::LocateDirectory)'
+  '';
+
+  buildInputs = [
+    qtcharts
+    qttools
+  ];
+
+  nativeBuildInputs = [ cmake wrapQtAppsHook ];
+
+  preConfigure = ''
+    lrelease stacer/stacer.pro
+  '';
+
+  postInstall = ''
+    install -Dm644 ../translations/*.qm -t $out/share/stacer/translations
+  '';
+
+  meta = with lib; {
+    description = "Linux System Optimizer and Monitoring";
+    homepage = "https://github.com/oguzhaninan/stacer";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ dit7ya ];
+    platforms = platforms.linux;
+  };
+}