aboutsummaryrefslogtreecommitdiff
path: root/.config/nixpkgs/shells/pure/shell.nix
blob: 2e583655ab48a3e965e0536629f9e465ec7e4445 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
let

  name = "nix-shell.pure";
  pkgs = import <nixpkgs> { };

  shell = pkgs.writeShellApplication {
    inherit name;
    text = ''
      /usr/bin/env --ignore-environment /bin/sh -c ${
        pkgs.writeScript name ''
          export PS1='\h (${name}) \W \$ '
          export PATH=${pkgs.lib.strings.makeBinPath [ pkgs.busybox ]}
          /bin/sh
        ''
      };
    '';
  };

in pkgs.mkShell {
  inherit name;
  shellHook = "exec ${shell}/bin/${shell.name}";
}