summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple/whatsupnix/default.nix
blob: 62ef597c8ee886e4a4ad1106358d7be676eda2ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{ bash, coreutils, gawk, makeWrapper, nix, openssh, stdenv }:

stdenv.mkDerivation {
  name = "whatsupnix";
  phases = [ "installPhase" ];
  nativeBuildInputs = [ makeWrapper ];
  installPhase = ''
    mkdir -p $out/bin
    cat - ${./whatsupnix.bash} > $out/bin/whatsupnix <<\EOF
    #! ${bash}/bin/bash
    export PATH=${stdenv.lib.makeBinPath [ coreutils gawk nix openssh ]}
    EOF
    chmod +x $out/bin/whatsupnix
  '';
}