2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, btrfs-progs }:
|
2018-05-13 00:10:36 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-05-05 12:03:33 +02:00
|
|
|
pname = "compsize";
|
2021-01-21 12:11:51 +01:00
|
|
|
version = "1.4";
|
2018-05-13 00:10:36 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kilobyte";
|
2021-01-21 12:11:51 +01:00
|
|
|
repo = pname;
|
2019-05-05 12:03:33 +02:00
|
|
|
rev = "v${version}";
|
2021-01-21 12:11:51 +01:00
|
|
|
sha256 = "0gk2vibfl9fh7biznlbr3dwknrwbm5q5602q95jbjvk185g9z126";
|
2018-05-13 00:10:36 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ btrfs-progs ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mkdir -p $out/share/man/man8
|
|
|
|
install -m 0755 compsize $out/bin
|
|
|
|
install -m 0444 compsize.8 $out/share/man/man8
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-05-13 00:10:36 +02:00
|
|
|
description = "btrfs: Find compression type/ratio on a file or set of files";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/kilobyte/compsize";
|
2018-05-13 00:10:36 +02:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ CrazedProgrammer ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|