Build Rust Workspace from Github for Devshell

I want to build the pavex-cli tool from Github. There’s no nix package and it lives in a workspace that’s in the libs subdir of this repo: GitHub - LukeMathWalker/pavex: An easy-to-use Rust framework for building robust and performant APIs
So far I have completely failed to do so. If I set the src to the libs dir, it fails because it expects the template dir from two levels above the $CARGO_MANIFEST_DIR to exist, and if I set the src to the base of the repo, I get a bunch of errors about purity.
Here’s what I have so far:

{
  description = "Build Pavex tools";

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

    flake-utils.url = "github:numtide/flake-utils";
    
    cargo-px-git = {
      url = "github:/LukeMathWalker/cargo-px";
      flake = false;
    };
    cargo-pavex-git = {
      url = "github:LukeMathWalker/pavex";
      flake = false;
    };

    rust-overlay = {
      url = "github:oxalica/rust-overlay";
      inputs = {
        nixpkgs.follows = "nixpkgs";
        flake-utils.follows = "flake-utils";
      };
    };
  };

  outputs = { self, nixpkgs, flake-utils, rust-overlay, ... } @inputs:
    flake-utils.lib.eachDefaultSystem
      (system:
        let
          pkgs = import nixpkgs {
            inherit system;
            overlays = [ (import rust-overlay) ];
          };
          inherit (pkgs) lib;
          rustTarget = pkgs.rust-bin.selectLatestNightlyWith( toolchain: toolchain.default.override {
            extensions = [ "rust-src" "rust-analyzer" "rustc-codegen-cranelift-preview" "rust-docs-json"];
            targets = [ "wasm32-unknown-unknown" ];
          });


          cargo-pavex_cli-git = pkgs.rustPlatform.buildRustPackage rec {
            pname = "cargo-pavex-cli";
            version = "0.2.22";
            #buildFeatures = ["no_downloads"]; # cargo-leptos will try to download Ruby and other things without this feature

            src = inputs.cargo-pavex-git;
            cargoLock = {
              lockFile = src + "/libs/Cargo.lock";
              outputHashes = {
                "matchit-0.7.3" = "sha256-1bhbWvLlDb6/UJ4j2FqoG7j3DD1dTOLl6RaiY9kasmQ=";
                #"pavex-0.1.0" = "sha256-NC7T1pcXJiWPtAWeiMUNzf2MUsYaRYxjLIL9fCqhExo=";
              };
            };
            buildAndTestSubdir = "libs";
            cargoSha256 = "";
            nativeBuildInputs = [pkgs.pkg-config pkgs.openssl pkgs.git];

            buildInputs = with pkgs;
              [openssl pkg-config git]
              ++ lib.optionals stdenv.isDarwin [
              Security
            ];

            doCheck = false; # integration tests depend on changing cargo config

            meta = with lib; {
            description = "An easy-to-use Rust framework for building robust and performant APIs";
            homepage = "https://github.com/LukeMatthewWalker/pavex";
            changelog = "https://github.com/LukeMatthewWalker/pavex/blob/v${version}/CHANGELOG.md";
            license = with licenses; [mit];
            maintainers = with maintainers; [benwis];
          };
      };
          cargo-px-git = pkgs.rustPlatform.buildRustPackage rec {
            pname = "cargo-px";
            version = "0.2.22";
            #buildFeatures = ["no_downloads"]; # cargo-leptos will try to download Ruby and other things without this feature

            src = inputs.cargo-px-git;

            cargoSha256 ="sha256-+pyeqh0IoZ1JMgbhWxhEJw1MPgG7XeocVrqJoSNjgDA=";

            nativeBuildInputs = [pkgs.pkg-config pkgs.openssl pkgs.git];

            buildInputs = with pkgs;
              [openssl pkg-config git]
              ++ lib.optionals stdenv.isDarwin [
              Security
            ];

            doCheck = false; # integration tests depend on changing cargo config

            meta = with lib; {
            description = "A cargo subcommand that extends cargo's capabilities when it comes to code generation.";
            homepage = "https://github.com/LukeMatthewWalker/cargo-px";
            changelog = "https://github.com/LukeMatthewWalker/cargo-px/blob/v${version}/CHANGELOG.md";
            license = with licenses; [mit];
            maintainers = with maintainers; [benwis];
          };
      };
        in
        {
          
          devShells.default = pkgs.mkShell {

            # Extra inputs can be added here
            nativeBuildInputs = with pkgs; [
              rustTarget
              openssl
              pkg-config
              clang
              tailwindcss
              mold-wrapped
              cargo-px-git
              cargo-pavex_cli-git
            ];
            RUST_SRC_PATH = "${rustTarget}/lib/rustlib/src/rust/library";
            MOLD_PATH = "${pkgs.mold-wrapped}/bin/mold";

            shellHook = ''
            sed -i -e '/rustflags = \["-C", "link-arg=-fuse-ld=/ s|ld=.*|ld=${pkgs.mold-wrapped}/bin/mold"]|' .cargo/config.toml
            '';
            LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
          };
        });
}

I can’t even tell if there are more options to buildRustPackage because the source of it eludes me, and so far google has been unhelpful.

How can I make this work?