depot/third_party/nixpkgs/pkgs/tools/admin/afterburn/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

37 lines
1.1 KiB
Nix

{ lib, openssl, pkg-config, fetchFromGitHub, rustPlatform }:
rustPlatform.buildRustPackage rec {
pname = "afterburn";
version = "5.4.3";
src = fetchFromGitHub {
owner = "coreos";
repo = "afterburn";
rev = "v${version}";
sha256 = "sha256-IxAmamWJjM8DAEihH3lYgOLKOcSRvh48GSIX797Nhjo=";
};
cargoHash = "sha256-vQTxqAnnfjg4zFSOPLIcchRjqv0HJ3L2jBSNubpO9DM=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
postPatch = ''
substituteInPlace ./systemd/afterburn-checkin.service --replace /usr/bin $out/bin
substituteInPlace ./systemd/afterburn-firstboot-checkin.service --replace /usr/bin $out/bin
substituteInPlace ./systemd/afterburn-sshkeys@.service.in --replace /usr/bin $out/bin
substituteInPlace ./systemd/afterburn.service --replace /usr/bin $out/bin
'';
postInstall = ''
DEFAULT_INSTANCE=root PREFIX= DESTDIR=$out make install-units
'';
meta = with lib; {
homepage = "https://github.com/coreos/ignition";
description = "A one-shot cloud provider agent";
license = licenses.asl20;
maintainers = [ maintainers.arianvp ];
platforms = platforms.linux;
};
}