{
  inputs,
  flake,
  self,
  rustPlatform,
  pkg-config,
  openssl,
  rustBuilder,
  runCommand,
  stdenv,
  system,
  lib,
  cacert,
  writeText,
  ...
}: let
  src = ./.;
  cargoToml = inputs.util.lib.cargoToml;
  cargo = cargoToml src;
  cargoNix = runCommand "create-cargo-nix" {
    outputHashAlgo = "sha256";
    outputHashMode = "flat";
    #outputHash = lib.fakeHash;
    outputHash = "sha256-G/YuLek881kQ3DBAjR+Y6wr2L46XrYx/YGRKLn/NcrE=";
  } ''
    set +a
    export CARGO_HTTP_CAINFO="${cacert}/etc/ssl/certs/ca-bundle.crt"
    export CARGO_HOME=$PWD/.cargo
    export RUSTUP_HOME=$PWD/.rustup
    set -a
    mkdir -p "$CARGO_HOME" "$RUSTUP_HOME"
    mkdir -p .
    cp -r ${flake}/* .
    ${inputs.cargo2nix.packages.${system}.cargo2nix}/bin/cargo2nix --locked
    cp ./Cargo.nix $out
    chmod 0444 $out
  '';

  rustPkgs = rustBuilder.makePackageSet {
    rustVersion = "1.88.0";
    workspaceSrc = ./../..;
    packageFun = builtins.trace "${cargoNix}" (import "${cargoNix}");
  };
in
  rustPkgs.workspace.vproxy-bot {}
  #rustPlatform.buildRustPackage {
  #  pname = cargo.package.name;
  #  version = cargo.package.version;

  #  inherit src;
  #  nativeBuildInputs = [ pkg-config ];
  #  buildInputs = [ openssl ];

  #  cargoLock.lockFile = ./Cargo.lock;

  #  doCheck = true;
  #}
