let
  nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/release-24.11";
  pkgs = (import nixpkgs {}).pkgsCross.riscv32-embedded;
in

# callPackage is needed due to https://github.com/NixOS/nixpkgs/pull/126844
pkgs.pkgsStatic.callPackage ({ mkShell, zlib, pkg-config, file, gdb }: mkShell {
  # these tools run on the build platform, but are configured to target the host platform
  nativeBuildInputs = [ pkg-config file gdb ];
  # libraries needed for the host platform
  buildInputs = [ zlib ];
}) {}