summaryrefslogtreecommitdiff
path: root/breakds/shell.nix
diff options
context:
space:
mode:
authorKjetil Orbekk <kjetil.orbekk@gmail.com>2019-12-15 08:54:28 -0500
committerKjetil Orbekk <kjetil.orbekk@gmail.com>2019-12-15 08:54:28 -0500
commitdbceffd9a1a52d9388d5f36fa58e35c5b0e24130 (patch)
tree19c3bb9458ea733b1cfd8d056fe81b32678fa5c2 /breakds/shell.nix
parentb27ede6524ea8794dd8a95213d1861cd9ff2d745 (diff)
parent28b6d85e21b6f9a6e3aad4ff7a5a478fec3f5944 (diff)
Merge branch 'master' of dragon.orbekk.com:/storage/projects/sandbox
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..af8666d
--- /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
+ '')
+ ];
+}