summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjetil Orbekk <kjetil.orbekk@gmail.com>2019-10-26 08:46:57 -0400
committerKjetil Orbekk <kjetil.orbekk@gmail.com>2019-10-26 08:46:57 -0400
commitf602876c0d217aed6064519bf2e0cb4ad968e05c (patch)
treea4e82df2c3cb7107787ba444ee8d9db147370df7
parente256cf48d4b36c3ee0e7462f1e27ec1bcbb971ae (diff)
hostname test
-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
+ '')
+ ];
+}