about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2021-01-21 16:06:19 +0100
committerGitHub <noreply@github.com>2021-01-21 16:06:19 +0100
commit126fb3c888239399a195186321f225b249d9dba2 (patch)
tree986d0f893d1adcd9e53e8ebe92f460490d4386a2 /pkgs
parent2f527e095d0cf27b9a213eb31cb7c1246974c492 (diff)
parent4e57aa0ecc6a89e95127d0057dfd3edafc9eb653 (diff)
Merge pull request #68680 from arianvp/afterburn
 afterburn: init at 4.6.0
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/admin/afterburn/default.nix37
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/tools/admin/afterburn/default.nix b/pkgs/tools/admin/afterburn/default.nix
new file mode 100644
index 0000000000000..0d3cd957324b8
--- /dev/null
+++ b/pkgs/tools/admin/afterburn/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, lib, openssl, pkg-config, fetchFromGitHub, rustPlatform }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "afterburn";
+  version = "4.6.0";
+
+  src = fetchFromGitHub {
+    owner = "coreos";
+    repo = "afterburn";
+    rev = "v${version}";
+    sha256 = "1afy9spm8g8bq2pw44dkrkfz4aimhdz4h5lg9iafby832v5dxbqj";
+  };
+
+  cargoSha256 = "035k55l0hs39a87iq8yxx4i87829kzvvmlgph0adjfmsppz5b8k1";
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ openssl ];
+
+  patchPhase = ''
+    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" ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index dc49b02cc7ab7..3fece913beb7c 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -21439,6 +21439,8 @@ in
 
   docker-distribution = callPackage ../applications/virtualization/docker/distribution.nix { };
 
+  afterburn = callPackage ../tools/admin/afterburn {};
+
   amazon-ecr-credential-helper = callPackage ../tools/admin/amazon-ecr-credential-helper { };
 
   docker-credential-gcr = callPackage ../tools/admin/docker-credential-gcr { };