summaryrefslogtreecommitdiff
path: root/breakds/shell.nix
diff options
context:
space:
mode:
Diffstat (limited to 'breakds/shell.nix')
-rw-r--r--breakds/shell.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/breakds/shell.nix b/breakds/shell.nix
new file mode 100644
index 0000000..2f97828
--- /dev/null
+++ b/breakds/shell.nix
@@ -0,0 +1,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
+ '')
+ ];
+}