]> git.immae.eu Git - perso/Immae/Config/Nixies.git/blame - shells/sub_bash.nix
Initial commit
[perso/Immae/Config/Nixies.git] / shells / sub_bash.nix
CommitLineData
8eb07d94
IB
1# run with
2# nix-shell shell.nix --run 'touch in ; tail -f in | bash & echo $! > pid'
3# and then send commands with
4# echo 'compute_me "1 + 3"' >> in
5{ pkgs ? import <nixpkgs> {} }:
6pkgs.mkShell {
7 buildInputs = [ pkgs.bc ];
8 shellHook = ''
9 compute_me() {
10 echo "$1" | bc;
11 }
12 export -f compute_me
13
14 echo "I’m ready"
15 '';
16}