about summary refs log tree commit diff
path: root/ops/deploy-whitby/default.nix
blob: 640f8ecfd23a8b66e4ea59fa94451538b621204b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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
  '';
}