summary refs log tree commit diff
path: root/pkgs/os-specific/linux/compsize/default.nix
blob: 9d0dbeffaee3c509af352cc2a82bb89b40276483 (plain) (blame)
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
{ lib, stdenv, fetchFromGitHub, btrfs-progs }:

stdenv.mkDerivation rec {
  pname = "compsize";
  version = "1.5";

  src = fetchFromGitHub {
    owner = "kilobyte";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-OX41ChtHX36lVRL7O2gH21Dfw6GPPEClD+yafR/PFm8=";
  };

  buildInputs = [ btrfs-progs ];

  installFlags = [
    "PREFIX=${placeholder "out"}"
  ];

  preInstall = ''
    mkdir -p $out/share/man/man8
  '';

  meta = with lib; {
    description = "btrfs: Find compression type/ratio on a file or set of files";
    homepage = "https://github.com/kilobyte/compsize";
    license = licenses.gpl2Plus;
    maintainers = with maintainers; [ CrazedProgrammer ];
    platforms = platforms.linux;
  };
}