nix-samples/hello-versions/shell.nix
2024-03-17 17:33:12 +01:00

16 lines
438 B
Nix

# https://lazamar.co.uk/nix-versions/
# The following will:
# - load <nixpkgs> to get the pkgs.mkShell lambda
# - load the given tarball (zsh 5.4.2 in channel unstable)
# - start a shell with this old version of zsh
{
oldpkgs ? (import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/473b58f20e491312a03c9c1578c89116e39a1d50.tar.gz") {}),
pkgs ? (import <nixpkgs> {})
}:
pkgs.mkShell {
packages = [
oldpkgs.zsh
];
}