summaryrefslogtreecommitdiff
path: root/derivations/crazydiskinfo/default.nix
blob: 69d9fa14b6a479634b1b86cb3c349c8401700546 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ lib
, cmake
, fetchFromGitHub
, fetchpatch
, libatasmart
, ncurses5
, stdenv
}:

stdenv.mkDerivation rec {
  pname = "crazydiskinfo";
  version = "1.1.0";

  src = fetchFromGitHub {
    owner = "otakuto";
    repo = pname;
    rev = "refs/tags/${version}";
    sha256 = "sha256-+6ShoaggQ256sLSJDj4d16OipUYX/4JjEwLL5hswjiQ=";
  };

  patches = [
    # Fix build warnings, original maintainer is MIA
    (fetchpatch {
      url = "https://patch-diff.githubusercontent.com/raw/otakuto/crazydiskinfo/pull/33.diff";
      sha256 = "sha256-z9aOQFsivu6sYgsZBOlnTvqnoR2ro/jyuO/WOimLSXk=";
    })
  ];

  buildInputs = [ cmake libatasmart ncurses5 ];

  cmakeFlags = [ "-DCMAKE_INSTALL_PREFIX=$out" ];

  meta = with lib; {
    description = "CrazyDiskInfo is an interactive TUI S.M.A.R.T viewer for Unix systems";
    license = licenses.mit;
    maintainers = [ maintainers.tjkeller ];
  };
}