summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/df/dfc/package.nix
blob: 481c59d61da9ae68e21c0da3b7beda9c90ba7852 (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
39
40
41
42
{
  lib,
  stdenv,
  fetchFromGitHub,
  cmake,
  gettext,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "dfc";
  version = "3.1.1";

  src = fetchFromGitHub {
    owner = "rolinh";
    repo = "dfc";
    tag = "v${finalAttrs.version}";
    hash = "sha256-k15q04dNWmHVeUabaCogkESQ+k63ZV7Xph2SMNpV/N8=";
  };

  # Fix for CMake v4
  # ref. https://github.com/rolinh/dfc/pull/35
  postPatch = ''
    substituteInPlace CMakeLists.txt --replace-fail \
      "cmake_minimum_required(VERSION 2.8.4)" \
      "cmake_minimum_required(VERSION 3.10)"
  '';

  nativeBuildInputs = [
    cmake
    gettext
  ];

  meta = {
    homepage = "https://github.com/rolinh/dfc";
    changelog = "https://github.com/rolinh/dfc/releases/tag/${finalAttrs.src.tag}";
    description = "Displays file system space usage using graphs and colors";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ qknight ];
    platforms = lib.platforms.all;
    mainProgram = "dfc";
  };
})