nixpkgs/pkgs/tools/admin/afterburn/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, openssl, pkg-config, fetchFromGitHub, rustPlatform }:
2019-09-13 16:11:03 +00:00
rustPlatform.buildRustPackage rec {
pname = "afterburn";
2024-06-19 00:27:06 +00:00
version = "5.6.0";
2019-09-13 16:11:03 +00:00
src = fetchFromGitHub {
owner = "coreos";
repo = "afterburn";
rev = "v${version}";
2024-06-19 00:27:06 +00:00
sha256 = "sha256-IAYQJviSQHKeayI0uAEbXX+vQxfAbMOqP2fH+2VPamQ=";
2019-09-13 16:11:03 +00:00
};
2024-06-19 00:27:06 +00:00
cargoHash = "sha256-BJ8WV8FcRrwPHhCY2GiOWDP72/T3K9eJIrPeoIa+9Sk=";
2019-09-13 16:11:03 +00:00
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
2021-08-11 08:35:43 +00:00
postPatch = ''
2019-09-13 16:11:03 +00:00
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 = "One-shot cloud provider agent";
2019-09-13 16:11:03 +00:00
license = licenses.asl20;
maintainers = [ maintainers.arianvp ];
2023-02-09 07:41:01 +00:00
platforms = platforms.linux;
2024-02-11 02:19:15 +00:00
mainProgram = "afterburn";
2019-09-13 16:11:03 +00:00
};
}