Create a shell.nix with the following:
let nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz"; pkgs = import nixpkgs { };inpkgs.mkShell { packages = [ pkgs.python3 ]; shellHook = '' echo "Welcome in my nix shell" '';}run
nix-shellThis activates your shell.nix and you should see:
unpacking 'https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz' into the Git cache...Welcome in your nix shellpython3 is available
$ python3 --versionTo leave the shell
ctrl+DFor further information check out nix-shell