mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 00:53:12 +03:00
Merge pull request #188042 from totoroot/init/wsysmon-0.1.0
This commit is contained in:
commit
f877bb5c5f
53
pkgs/tools/system/wsysmon/default.nix
Normal file
53
pkgs/tools/system/wsysmon/default.nix
Normal file
@ -0,0 +1,53 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, substituteAll
|
||||
, cmake
|
||||
, pkg-config
|
||||
, gtkmm3
|
||||
, gtk3
|
||||
, procps
|
||||
, spdlog
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "wsysmon";
|
||||
version = "0.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "slyfabi";
|
||||
repo = "wsysmon";
|
||||
rev = version;
|
||||
sha256 = "sha256-5kfZT+hm064qXoAzi0RdmUqXi8VaXamlbm+FJOrGh3A=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Prevent CMake from trying to fetch libraries from GitHub
|
||||
(substituteAll {
|
||||
src = ./dependencies.patch;
|
||||
spdlog_src = spdlog.src;
|
||||
})
|
||||
# Add an installPhase
|
||||
./install.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gtkmm3
|
||||
gtk3
|
||||
procps
|
||||
spdlog
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A windows task manager clone for Linux";
|
||||
homepage = "https://github.com/SlyFabi/WSysMon";
|
||||
license = [ licenses.mit ];
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ totoroot ];
|
||||
};
|
||||
}
|
14
pkgs/tools/system/wsysmon/dependencies.patch
Normal file
14
pkgs/tools/system/wsysmon/dependencies.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 31e8048..1eec936 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -7,8 +7,7 @@ include(FetchContent)
|
||||
|
||||
FetchContent_Declare(
|
||||
spdlog
|
||||
- GIT_REPOSITORY https://github.com/gabime/spdlog.git
|
||||
- GIT_TAG v1.10.0
|
||||
+ SOURCE_DIR @spdlog_src@
|
||||
)
|
||||
FetchContent_MakeAvailable(spdlog)
|
||||
|
14
pkgs/tools/system/wsysmon/install.patch
Normal file
14
pkgs/tools/system/wsysmon/install.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 31e8048..a125b3f 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -20,3 +20,9 @@ include_directories(${GTKMM_INCLUDE_DIRS} ${X11_INCLUDE_DIR})
|
||||
|
||||
add_executable(WSysMon src/main.cpp src/ui/MainWindow.cpp src/ui/widgets/GraphWidget.cpp src/ui/widgets/PerformanceButton.cpp src/ui/views/ProcessesView.cpp src/ui/views/PerformanceView.cpp src/ui/views/performance/PerformanceCPUView.cpp src/ui/views/performance/PerformanceGPUView.cpp src/ui/views/performance/PerformanceNetworkView.cpp src/ui/views/performance/PerformanceRAMView.cpp src/utils/DispatcherThread.cpp src/utils/UnitConverter.cpp src/utils/X11Utils.cpp src/api/process/ProcessManager.cpp src/api/process/ProcessNode.cpp src/api/linux/ProcessesApi.cpp src/api/linux/GPUApi.cpp src/api/linux/NetworkApi.cpp src/api/linux/SystemInfoApi.cpp src/api/DiskApi.h src/api/linux/DiskApi.cpp src/ui/views/performance/PerformanceDiskView.cpp src/ui/views/performance/PerformanceDiskView.h src/api/linux/gpu/nvml.h src/api/linux/gpu/nvml_hook_funcs.inl src/api/linux/gpu/NvGpuApi.cpp src/api/linux/gpu/NvGpuApi.h src/api/HwMonApi.h src/api/linux/HwMonApi.cpp)
|
||||
target_link_libraries(WSysMon PRIVATE spdlog::spdlog pthread procps ${CMAKE_DL_LIBS} ${GTKMM_LIBRARIES} ${X11_LIBRARIES})
|
||||
+
|
||||
+install(
|
||||
+ TARGETS
|
||||
+ WSysMon
|
||||
+ RUNTIME DESTINATION bin
|
||||
+)
|
@ -13122,6 +13122,8 @@ with pkgs;
|
||||
|
||||
wrk2 = callPackage ../tools/networking/wrk2 { };
|
||||
|
||||
wsysmon = callPackage ../tools/system/wsysmon { };
|
||||
|
||||
wuzz = callPackage ../tools/networking/wuzz { };
|
||||
|
||||
wv = callPackage ../tools/misc/wv { };
|
||||
|
Loading…
Reference in New Issue
Block a user