2022-07-15 12:00:00 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, wrapQtAppsHook
|
|
|
|
, qtbase
|
|
|
|
, qttools
|
|
|
|
, fio
|
|
|
|
, cmake
|
2024-02-11 22:13:55 +00:00
|
|
|
, polkit-qt
|
2022-07-15 12:00:00 +00:00
|
|
|
, extra-cmake-modules
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "kdiskmark";
|
2024-02-11 22:13:55 +00:00
|
|
|
version = "3.1.4";
|
2022-07-15 12:00:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jonmagon";
|
|
|
|
repo = "kdiskmark";
|
|
|
|
rev = version;
|
2024-02-11 22:13:55 +00:00
|
|
|
sha256 = "sha256-JueY7zw9PIo9ETi7pQLpw8FGRhNXYXeXEvTzZGz9lbw=";
|
|
|
|
fetchSubmodules = true;
|
2022-07-15 12:00:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake wrapQtAppsHook ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
qtbase
|
|
|
|
qttools
|
|
|
|
extra-cmake-modules
|
2024-02-11 22:13:55 +00:00
|
|
|
polkit-qt
|
2022-07-15 12:00:00 +00:00
|
|
|
];
|
|
|
|
|
2024-02-11 22:13:55 +00:00
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace CMakeLists.txt \
|
|
|
|
--replace \$\{POLKITQT-1_POLICY_FILES_INSTALL_DIR\} $out/share/polkit-1/actions
|
2022-07-15 12:00:00 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
qtWrapperArgs =
|
|
|
|
[ "--prefix" "PATH" ":" (lib.makeBinPath [ fio ]) ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "HDD and SSD benchmark tool with a friendly graphical user interface";
|
|
|
|
longDescription = ''
|
|
|
|
If kdiskmark is not run as root it can rely on polkit to get the necessary
|
|
|
|
privileges. In this case you must install it with `environment.systemPackages`
|
|
|
|
on NixOS, nix-env will not work.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/JonMagon/KDiskMark";
|
|
|
|
maintainers = [ maintainers.symphorien ];
|
2022-07-17 18:20:16 +00:00
|
|
|
license = licenses.gpl3Only;
|
|
|
|
platforms = platforms.linux;
|
2023-11-23 21:09:35 +00:00
|
|
|
mainProgram = "kdiskmark";
|
2022-07-15 12:00:00 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|