{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    utils.url = "github:numtide/flake-utils";
  };

  outputs =
    {
      self,
      nixpkgs,
      utils,
    }:
    utils.lib.eachDefaultSystem (
      system:
      let
        pkgs = import nixpkgs { inherit system; };
      in
      {
        devShell =
          with pkgs;
          mkShell.override { stdenv = pkgs.clangStdenv; } {
            nativeBuildInputs = [
              pre-commit
              cargo
              cargo-watch
              rustc
              rustfmt
              rustPackages.clippy
              llvmPackages.bintools
              cargo-outdated
              parquet-tools
            ];
            shellHook = ''
              pre-commit install
            '';
            RUST_SRC_PATH = rustPlatform.rustLibSrc;
          };
      }
    );
}
