message: Import `pkgs.lib` at the top in `shell.nix`
diff: # `dev`: enables tooling useful for development, but not strictly necessary to run/build
  { pkgs ? (import <nixpkgs>) { }, ops ? true, dev ? true }:
  +with pkgs.lib;
  let
  # `volatile` is not packaged in nix.
  volatile = pkgs.python38Packages.buildPythonPackage rec {
  @@ -21,15 +22,15 @@ let
  };
  python = pkgs.python3.withPackages (python-packages:
  with python-packages;
  - [ click ] ++ lib.lists.optionals ops [ kubernetes volatile ]
  - ++ lib.lists.optionals dev [ prometheus_client psutil supervisor toml ]);
  + [ click ] ++ lists.optionals ops [ kubernetes volatile ]
  + ++ lists.optionals dev [ prometheus_client psutil supervisor toml ]);
  in pkgs.stdenv.mkDerivation {
  name = "rustenv";
  nativeBuildInputs = with pkgs; [ pkg-config perl which protobuf ];
  buildInputs = with pkgs;
  [ cmake pkg-config openssl.dev zlib.dev rustup ]
  - ++ lib.lists.optionals ops [ kubectl python skopeo git nix ]
  - ++ lib.lists.optionals dev [ black podman ];
  + ++ lists.optionals ops [ kubectl python skopeo git nix ]
  + ++ lists.optionals dev [ black podman ];
  # Enable SSL support in pure shells
  SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
  @@ -40,8 +41,7 @@ in pkgs.stdenv.mkDerivation {
  # The shell hook provides a predefined environment with kubectl and nctl setup, if `ops` and `dev`
  # respectively are enabled.
  - shellHook = with pkgs.lib;
  - let
  + shellHook = let
  devS = boolToString dev;
  opsS = boolToString ops;
  in ''
  