summaryrefslogtreecommitdiff
path: root/breakds/shell.nix
blob: af8666dad214cb1b6ecd7ab4649b7bcc04e10796 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
with import <nixpkgs> {};

stdenv.mkDerivation rec {
  name = "my-environment";
  buildInputs = [
    (writeShellScriptBin "hostname" ''
      if [[ $# -eq 1 && $1 == "-l" ]]; then
        echo "special case: $(${pkgs.nettools}/bin/hostname -i)"
      else
        ${pkgs.nettools}/bin/hostname "$@"
      fi
    '')
  ];
}