1 { lib, stdenv, fetchpatch, fetchFromGitHub, btrfs-progs, python3 }:
4 btrfsProgsPatched = btrfs-progs.overrideAttrs {
7 url = "https://raw.githubusercontent.com/Lakshmipathi/dduper/1f1d29eff61430e118f88239545a29f0bcf3e15d/patch/btrfs-progs-v6.3.3/0001-Print-csum-for-a-given-file-on-stdout.patch";
8 hash = "sha256-bO0t8QePnUbMkQQPesZlBF/khD/H8AaWHr2GkOnT6x8=";
12 py3 = python3.withPackages (ps: with ps; [
17 stdenv.mkDerivation rec {
21 src = fetchFromGitHub {
22 owner = "lakshmipathi";
25 sha256 = "09ncdawxkffldadqhfblqlkdl05q2qmywxyg6p61fv3dr2f2v5wm";
34 substituteInPlace ./dduper --replace "/usr/sbin/btrfs.static" "${btrfsProgsPatched}/bin/btrfs"
39 install -m755 ./dduper $out/bin
43 description = "Fast block-level out-of-band BTRFS deduplication tool";
44 mainProgram = "dduper";
45 homepage = "https://github.com/Lakshmipathi/dduper";
46 license = licenses.gpl2Plus;
47 maintainers = with maintainers; [ thesola10 ];
48 platforms = platforms.linux;