17 , proxmox-backup-client
21 pname = "proxmox-backup-client";
24 proxmox-backup_src = fetchgit {
25 url = "git://git.proxmox.com/git/proxmox-backup.git";
27 name = "proxmox-backup";
28 hash = "sha256-9rzUGaUoc87VkB4XJUwI0BjuvxdemE6fjTIR7VRp55Y=";
31 # Same revision as used in
32 # https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=proxmox-backup-client
33 proxmox_src = fetchgit {
34 url = "git://git.proxmox.com/git/proxmox.git";
35 rev = "863d7603403405ccbf8e841b875bf3c9a7a76116";
37 hash = "sha256-aSBT0TGhmM7QDux4gDY1k4HQhAMNWvxX+IVIsq6KeuM=";
40 proxmox-fuse_src = fetchgit {
41 url = "git://git.proxmox.com/git/proxmox-fuse.git";
42 rev = "6faec3a52fcdb0df3ca13fee2977683824d62d01"; # 0.1.7-1
43 name = "proxmox-fuse";
44 hash = "sha256-FwkZ5L7gJr9xZTQkdVHmOP8vnzf+To5Wz2SbIEzGUOY=";
47 proxmox-pxar_src = fetchgit {
48 url = "git://git.proxmox.com/git/pxar.git";
49 rev = "675ecff32fbeff0973eaea016c4b8f3877015adb";
51 hash = "sha256-P5fblRCFq7NI1UkP/jkg38bamM1yuJYX+YhCKPgS15Y=";
54 proxmox-pathpatterns_src = fetchgit {
55 url = "git://git.proxmox.com/git/pathpatterns.git";
56 rev = "5f625aacbd6f81d97a1c6f5476fb38769d069f26"; # 0.3.0
57 name = "pathpatterns";
58 hash = "sha256-717XSlvQdvP0Q516fEx04rsrLCk3QI8frTD5NMmkSr4=";
61 aurPatchCommit = "12c04aa14ee09cb3dafcbe193da9d36a6809695d";
64 rustPlatform.buildRustPackage {
65 inherit pname version;
72 proxmox-pathpatterns_src
75 sourceRoot = proxmox-backup_src.name;
77 # These patches are essentially un-upstreamable, due to being "workarounds" related to the
80 # A lot of Rust crates `proxmox-backup-client` depends on are only available through git (or
81 # Debian packages). This patch redirects all these dependencies to a local, relative path, which
82 # works in combination with the other three repos being checked out.
84 name = "0001-re-route-dependencies-not-available-on-crates.io-to-.patch";
85 url = "https://aur.archlinux.org/cgit/aur.git/plain/0001-re-route-dependencies-not-available-on-crates.io-to-.patch?h=proxmox-backup-client&id=${aurPatchCommit}";
86 hash = "sha256-YOlC8A1FKIbNY9+q6n/gDV0efHx2i3kwsmIdZcYhf80=";
88 # This patch prevents the generation of the man-pages for other components inside the repo,
89 # which would require them too be built too. Thus avoid wasting resources and just skip them.
91 name = "0002-docs-drop-all-but-client-man-pages.patch";
92 url = "https://aur.archlinux.org/cgit/aur.git/plain/0002-docs-drop-all-but-client-man-pages.patch?h=proxmox-backup-client&id=${aurPatchCommit}";
93 hash = "sha256-vUGDBx+g05ipL+boY9DaWDAMmstY1IDZs5nILbCIBLY=";
95 # `make docs` assumes that the binaries are located under `target/{debug,release}`, but due
96 # to how `buildRustPackage` works, they get put under `target/$RUSTC_TARGET/{debug,release}`.
97 # This patch simply fixes that up.
98 ./0001-docs-Add-target-path-fixup-variable.patch
102 cp ${./Cargo.lock} Cargo.lock
108 DEB_VERSION=${version} DEB_VERSION_UPSTREAM=${version} \
109 RUSTC_TARGET=${stdenv.hostPlatform.config} \
111 proxmox-backup-client.1 pxar.1
115 installManPage docs/output/man/proxmox-backup-client.1
116 installShellCompletion --cmd proxmox-backup-client \
117 --bash debian/proxmox-backup-client.bc \
118 --zsh zsh-completions/_proxmox-backup-client
120 installManPage docs/output/man/pxar.1
121 installShellCompletion --cmd pxar \
122 --bash debian/pxar.bc \
123 --zsh zsh-completions/_pxar
127 lockFileContents = builtins.readFile ./Cargo.lock;
131 "--package=proxmox-backup-client"
132 "--bin=proxmox-backup-client"
133 "--bin=dump-catalog-shell-cli"
140 nativeBuildInputs = [ git pkg-config pkgconf rustPlatform.bindgenHook installShellFiles sphinx ];
141 buildInputs = [ openssl fuse3 libuuid acl libxcrypt ];
143 passthru.tests.version = testers.testVersion {
144 package = proxmox-backup-client;
145 command = "${pname} version";
149 description = "Command line client for Proxmox Backup Server";
150 homepage = "https://pbs.proxmox.com/docs/backup-client.html";
151 changelog = "https://git.proxmox.com/?p=proxmox-backup.git;a=blob;f=debian/changelog;hb=refs/tags/v${version}";
152 license = licenses.agpl3Only;
153 maintainers = with maintainers; [ cofob christoph-heiss ];
154 platforms = platforms.linux;
155 mainProgram = "proxmox-backup-client";