Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 fetchurl, 6 btrfs-progs, 7}: 8 9let 10 # https://github.com/kilobyte/compsize/issues/52 11 btrfs-progs' = btrfs-progs.overrideAttrs (old: rec { 12 pname = "btrfs-progs"; 13 version = "6.10"; 14 src = fetchurl { 15 url = "mirror://kernel/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v${version}.tar.xz"; 16 hash = "sha256-M4KoTj/P4f/eoHphqz9OhmZdOPo18fNFSNXfhnQj4N8="; 17 }; 18 }); 19 20in 21stdenv.mkDerivation rec { 22 pname = "compsize"; 23 version = "1.5"; 24 25 src = fetchFromGitHub { 26 owner = "kilobyte"; 27 repo = "compsize"; 28 rev = "v${version}"; 29 sha256 = "sha256-OX41ChtHX36lVRL7O2gH21Dfw6GPPEClD+yafR/PFm8="; 30 }; 31 32 buildInputs = [ btrfs-progs' ]; 33 34 installFlags = [ 35 "PREFIX=${placeholder "out"}" 36 ]; 37 38 preInstall = '' 39 mkdir -p $out/share/man/man8 40 ''; 41 42 meta = with lib; { 43 description = "Find compression type/ratio on a file or set of files in Btrfs filesystem"; 44 mainProgram = "compsize"; 45 homepage = "https://github.com/kilobyte/compsize"; 46 license = licenses.gpl2Plus; 47 maintainers = with maintainers; [ CrazedProgrammer ]; 48 platforms = platforms.linux; 49 }; 50}