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

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=${lib.makeBinPath [ coreutils gawk nix openssh ]}
    EOF
    chmod +x $out/bin/whatsupnix
  '';
}