summaryrefslogtreecommitdiff
path: root/breakds/shell.nix
blob: 2f97828e82e43847d1d9ca0124153c31f2556ec0 (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
    '')
  ];
}