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

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

38 lines
1.3 KiB
Nix
Raw Normal View History

{ lib, openssl, pkg-config, fetchFromGitHub, rustPlatform }:
2019-09-13 18:11:03 +02:00
rustPlatform.buildRustPackage rec {
pname = "afterburn";
2022-05-27 03:01:06 +02:00
version = "5.3.0";
2019-09-13 18:11:03 +02:00
src = fetchFromGitHub {
owner = "coreos";
repo = "afterburn";
rev = "v${version}";
2022-05-27 03:01:06 +02:00
sha256 = "sha256-yX95qmcyouSSjEHorMpRJjZyrxIjQorwTpGtGZN4s6s=";
2019-09-13 18:11:03 +02:00
};
2022-05-27 03:01:06 +02:00
cargoSha256 = "sha256-DweJ608aJChn2ezAM7Ly0cwtLAvM1DZ5gc4WUVyKIco=";
2019-09-13 18:11:03 +02:00
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
2021-08-11 10:35:43 +02:00
postPatch = ''
2019-09-13 18:11:03 +02: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 = "This is a small utility, typically used in conjunction with Ignition, which reads metadata from a given cloud-provider and applies it to the system.";
license = licenses.asl20;
maintainers = [ maintainers.arianvp ];
platforms = [ "x86_64-linux" ];
};
}