Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 62 lines 1.3 kB view raw
1{ 2 stdenv, 3 lib, 4 wrapQtAppsHook, 5 qtbase, 6 qttools, 7 fio, 8 cmake, 9 polkit-qt, 10 extra-cmake-modules, 11 fetchFromGitHub, 12}: 13stdenv.mkDerivation rec { 14 pname = "kdiskmark"; 15 version = "3.1.4"; 16 17 src = fetchFromGitHub { 18 owner = "jonmagon"; 19 repo = "kdiskmark"; 20 rev = version; 21 hash = "sha256-JueY7zw9PIo9ETi7pQLpw8FGRhNXYXeXEvTzZGz9lbw="; 22 fetchSubmodules = true; 23 }; 24 25 nativeBuildInputs = [ 26 cmake 27 extra-cmake-modules 28 wrapQtAppsHook 29 ]; 30 31 buildInputs = [ 32 qtbase 33 qttools 34 polkit-qt 35 ]; 36 37 preConfigure = '' 38 substituteInPlace CMakeLists.txt \ 39 --replace \$\{POLKITQT-1_POLICY_FILES_INSTALL_DIR\} $out/share/polkit-1/actions 40 ''; 41 42 qtWrapperArgs = [ 43 "--prefix" 44 "PATH" 45 ":" 46 (lib.makeBinPath [ fio ]) 47 ]; 48 49 meta = with lib; { 50 description = "HDD and SSD benchmark tool with a friendly graphical user interface"; 51 longDescription = '' 52 If kdiskmark is not run as root it can rely on polkit to get the necessary 53 privileges. In this case you must install it with `environment.systemPackages` 54 on NixOS, nix-env will not work. 55 ''; 56 homepage = "https://github.com/JonMagon/KDiskMark"; 57 maintainers = [ maintainers.symphorien ]; 58 license = licenses.gpl3Only; 59 platforms = platforms.linux; 60 mainProgram = "kdiskmark"; 61 }; 62}