about summary refs log blame commit diff
path: root/ops/deploy-whitby/default.nix
blob: f4bd257c4f51a31406d455841e145a25b257d365 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                                 

                 

                











                                        
{ 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 [
        ansi2html
        git
        jq
        nix-diff
      ]}
  '';

  installCheckInputs = with pkgs; [
    shellcheck
  ];

  doInstallCheck = true;
  installCheckPhase = ''
    shellcheck $out/bin/deploy-whitby.sh
  '';
}