flake.nix.md

Python Development Shell Flake

FlakeFlake inputs and outputs are understood here, with flake-aware hovers and completion.
{
  description = "Python nix flake";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  };

  outputs = { self, nixpkgs }:
    let
      system = "x86_64-linux";
      pkgs = nixpkgs.legacyPackages.${system};
    in {
      devShells.${system}.default = pkgs.mkShell {
        packages = [
          (pkgs.python3.withPackages (p: [
            p.pandas
            p.requests
          ]))
        ];
      };
    };
}

Activate the development shell

$ nix develop

Share your thoughts