git.iko.soy/typeable/nixpkgs
on master help sign in
dduper: init at v0.04
commitec2c8dfc2bd06c9001d7a1144228e143031737b9 authorTheSola10 <me@thesola.io> dateSat 15 May 2021, 12:43 (6 years ago) parent83d907f
2 files changed+52
pkgs/tools/filesystems/dduper/default.nix+50 pkgs/top-level/all-packages.nix+2
pkgs/tools/filesystems/dduper/default.nixnew file+50
@@ -0,0 +1,50 @@
1+{ lib, stdenv, fetchpatch, fetchFromGitHub, btrfs-progs, python3 }:
2+
3+let
4+ btrfsProgsPatched = btrfs-progs.overrideAttrs (oldAttrs: {
5+ patches = [
6+ (fetchpatch {
7+ name = "0001-Print-csum-for-a-given-file-on-stdout.patch";
8+ url = "https://raw.githubusercontent.com/Lakshmipathi/dduper/8fab08e0f1901bf54411d25f1767b48c978074cb/patch/btrfs-progs-v5.9/0001-Print-csum-for-a-given-file-on-stdout.patch";
9+ sha256 = "1li9lslrap70ibad8sij3bgpxn5lqs0j10l60bmy3c36y866q3g1";
10+ })
11+ ];
12+ });
13+ py3 = python3.withPackages (ps: with ps; [
14+ prettytable
15+ numpy
16+ ]);
17+in
18+stdenv.mkDerivation rec {
19+ pname = "dduper";
20+ version = "0.04";
21+
22+ src = fetchFromGitHub {
23+ owner = "lakshmipathi";
24+ repo = "dduper";
25+ rev = "v${version}";
26+ sha256 = "09ncdawxkffldadqhfblqlkdl05q2qmywxyg6p61fv3dr2f2v5wm";
27+ };
28+
29+ buildInputs = [
30+ btrfsProgsPatched
31+ py3
32+ ];
33+
34+ patchPhase = ''
35+ substituteInPlace ./dduper --replace "/usr/sbin/btrfs.static" "${btrfsProgsPatched}/bin/btrfs"
36+ '';
37+
38+ installPhase = ''
39+ mkdir -p $out/bin
40+ install -m755 ./dduper $out/bin
41+ '';
42+
43+ meta = with lib; {
44+ description = "Fast block-level out-of-band BTRFS deduplication tool.";
45+ homepage = "https://github.com/Lakshmipathi/dduper";
46+ license = licenses.gpl2Plus;
47+ maintainers = with maintainers; [ thesola10 ];
48+ platforms = platforms.linux;
49+ };
50+}
pkgs/top-level/all-packages.nix+2
@@ -2288,6 +2288,8 @@ in
22882288
22892289 ddate = callPackage ../tools/misc/ddate { };
22902290
2291+ dduper = callPackage ../tools/filesystems/dduper { };
2292+
22912293 dedup = callPackage ../tools/backup/dedup { };
22922294
22932295 dehydrated = callPackage ../tools/admin/dehydrated { };