about summary refs log tree commit diff
path: root/ops/deploy-whitby/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'ops/deploy-whitby/default.nix')
-rw-r--r--ops/deploy-whitby/default.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/ops/deploy-whitby/default.nix b/ops/deploy-whitby/default.nix
new file mode 100644
index 000000000000..640f8ecfd23a
--- /dev/null
+++ b/ops/deploy-whitby/default.nix
@@ -0,0 +1,30 @@
+{ pkgs, ... }:
+
+pkgs.stdenv.mkDerivation {
+  name = "deploy-whitby";
+
+  phases = [ "installPhase" "installCheckPhase" ];
+
+  nativeBuildInputs = with pkgs; [
+    makeWrapper
+  ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    makeWrapper ${./deploy-whitby.sh} $out/bin/deploy-whitby.sh \
+      --prefix PATH : ${with pkgs; lib.makeBinPath [
+        nix-diff
+        ansi2html
+        git
+      ]}
+  '';
+
+  installCheckInputs = with pkgs; [
+    shellcheck
+  ];
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    shellcheck $out/bin/deploy-whitby.sh
+  '';
+}