How to do stuff.

Not much to see here. Go to a subpage or read the hintlets below.

Using nix-shell relative to a different package set

Example, using GHC 9.8.1 from a PR before it was merged into Nixpkgs proper.

nix-shell -I nixpkgs= -p haskell.compiler.ghc981

Note that this is equivalent to running random code off the internet, and that the above URL is not pinned at all.

Using ad-hoc packages from PyPI in nix-shell

Put something like this in your shell.nix:

{ pkgs ? import <nixpkgs> {} }:
  my-python-packages = ps: with ps; [
    (buildPythonPackage rec {
      pname = "futhark-data";
      version = "1.0.1";
      src = fetchPypi {
        inherit pname version;
        sha256 = "sha256-UJ0x642f5Q9749ffYIimQuF+sMTVOyx4iYZgrB86HFo=";
      doCheck = false;
  my-python = pkgs.python3.withPackages my-python-packages;
in my-python.env

Taken from here.