about summary refs log tree commit diff
path: root/pkgs/applications/backup/proxmox-backup-client/default.nix
blob: 92e44fc90febea128967f62fd6ea167a1b5b1a67 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{ lib, fetchgit, rustPlatform, pkg-config, openssl, fuse3, libuuid, acl, libxcrypt }:

rustPlatform.buildRustPackage rec {
  pname = "proxmox-backup-client";
  version = "2.2.1";

  srcs = [
    (fetchgit {
      url = "git://git.proxmox.com/git/proxmox-backup.git";
      rev = "v${version}";
      name = pname;
      hash = "sha256-uOKQe/BzO69f/ggEPoZQ2Rn3quytQrUeH7be19QV3KI=";
    })
    (fetchgit {
      url = "git://git.proxmox.com/git/proxmox.git";
      rev = "43b4440ef015d846161657490b18cf6ac7600fc4";
      name = "proxmox";
      hash = "sha256-05Z+IRRIioFGn+iAYG04DyNsgw9gQrJ6qAArpCwoIb0=";
    })
    (fetchgit {
      url = "git://git.proxmox.com/git/proxmox-fuse.git";
      rev = "d162ef9039878b871e2aa11b7d9a373ae512e2d1";
      name = "proxmox-fuse";
      hash = "sha256-w33ViWpBkCkMAhZVXiOdqnGOn/tddNRgzn71WioTnBU=";
    })
    (fetchgit {
      url = "git://git.proxmox.com/git/pxar.git";
      rev = "6f3f889e98c5f4e60c3b2c6bce73bd506b548c21";
      name = "pxar";
      hash = "sha256-GtNq6+O1xnxuR7b4TTWLFxcsejRyadSlk85H8C+yUGA=";
    })
  ];

  sourceRoot = pname;

  cargoPatches = [
    ./re-route-dependencies.patch
  ];

  postPatch = ''
    cp ${./Cargo.lock} Cargo.lock
    rm .cargo/config
  '';

  cargoLock = {
    lockFileContents = builtins.readFile ./Cargo.lock;
  };

  cargoBuildFlags = [
    "--package=proxmox-backup-client"
    "--bin=proxmox-backup-client"
    "--bin=dump-catalog-shell-cli"

    "--package=pxar-bin"
    "--bin=pxar"
  ];

  doCheck = false;

  nativeBuildInputs = [ pkg-config rustPlatform.bindgenHook ];
  buildInputs = [ openssl fuse3 libuuid acl libxcrypt ];

  meta = with lib; {
    description = "The command line client for Proxmox Backup Server";
    homepage = "https://pbs.proxmox.com/docs/backup-client.html";
    license = licenses.agpl3Only;
    maintainers = with maintainers; [ cofob christoph-heiss ];
    platforms = platforms.linux;
  };
}