summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple/whatsupnix/default.nix
blob: 1a108c5e9392102252f30e741bfa2d194f003d37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{ bash, coreutils, gawk, nix, makeWrapper, 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 ]}
    EOF
    chmod +x $out/bin/whatsupnix
  '';
}