btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / pr / proxmox-auto-install-assistant / package.nix
blobd161ab4ab0f38c6e8ffcee263005154a7cb2444f
2   lib,
3   fetchgit,
4   rustPlatform,
5   testers,
6   proxmox-auto-install-assistant,
7 }:
9 rustPlatform.buildRustPackage rec {
10   pname = "proxmox-auto-install-assistant";
11   version = "8.2.6";
13   src = fetchgit {
14     url = "git://git.proxmox.com/git/pve-installer.git";
15     rev = "c339618cbdcbce378bf192e01393a60903fe2b04";
16     hash = "sha256-nF2FpzXeoPIB+dW92HAI+EJZuMJxlnD012Yu3hL9OvU=";
17   };
19   postPatch = ''
20     rm -v .cargo/config.toml
21     cp -v ${./Cargo.lock} Cargo.lock
22     # fix up hard-coded version number to match that of the debian package
23     substituteInPlace proxmox-auto-install-assistant/Cargo.toml \
24       --replace-fail 'version = "0.1.0"' 'version = "${version}"'
25   '';
27   buildAndTestSubdir = "proxmox-auto-install-assistant";
29   cargoLock.lockFile = ./Cargo.lock;
31   passthru.tests.version = testers.testVersion { package = proxmox-auto-install-assistant; };
33   meta = {
34     description = "Tool to prepare a Proxmox installation ISO for automated installations";
35     longDescription = ''
36       This tool can be used to prepare a Proxmox installation ISO for automated installations.
37       Additional uses are to validate the format of an answer file or to test match filters and
38       print information on the properties to match against for the current hardware
39     '';
40     homepage = "https://pve.proxmox.com/wiki/Automated_Installation";
41     changelog = "https://git.proxmox.com/?p=pve-installer.git;a=blob;f=debian/changelog";
42     license = lib.licenses.agpl3Only;
43     maintainers = with lib.maintainers; [ christoph-heiss ];
44     platforms = lib.platforms.linux;
45     mainProgram = "proxmox-auto-install-assistant";
46   };