summary refs log tree commit diff
path: root/pkgs/tools/misc/lifecycled/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/misc/lifecycled/default.nix')
-rw-r--r--pkgs/tools/misc/lifecycled/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/tools/misc/lifecycled/default.nix b/pkgs/tools/misc/lifecycled/default.nix
new file mode 100644
index 00000000000..1c30b760a9c
--- /dev/null
+++ b/pkgs/tools/misc/lifecycled/default.nix
@@ -0,0 +1,31 @@
+{ lib
+, buildGoModule
+, fetchFromGitHub
+}:
+buildGoModule rec {
+  pname = "lifecycled";
+  version = "3.1.0";
+
+  src = fetchFromGitHub {
+    owner = "buildkite";
+    repo = "lifecycled";
+    rev = "v${version}";
+    sha256 = "F9eovZpwbigP0AMdjAIxULPLDC3zO6GxQmPdt5Xvpkk=";
+  };
+
+  vendorSha256 = "q5wYKSLHRzL+UGn29kr8+mUupOPR1zohTscbzjMRCS0=";
+
+  postInstall = ''
+    mkdir -p $out/lib/systemd/system
+    substitute init/systemd/lifecycled.unit $out/lib/systemd/system/lifecycled.service \
+      --replace /usr/bin/lifecycled $out/bin/lifecycled
+  '';
+
+  meta = with lib; {
+    description = "A daemon for responding to AWS AutoScaling Lifecycle Hooks";
+    homepage = "https://github.com/buildkite/lifecycled/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ cole-h grahamc ];
+  };
+}
+