httproxide 0.1.0

Rusted HTTP router reverse-proxy
Documentation
{

  description = "httproxide";

  inputs.nixpkgs.url = "github:NixOS/nixpkgs/staging-next";

  outputs = { self, nixpkgs }:
    let
      systems =
        [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
      forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);

      # Memoize nixpkgs for different platforms for efficiency.
      nixpkgsFor = forAllSystems (system:
        import nixpkgs {
          inherit system;
          overlays = [ self.overlays.default ];
        });

    in {
      overlays.default = final: prev: {
        httproxide = final.callPackage ({ rustPlatform }:

          rustPlatform.buildRustPackage {
            pname = "httproxide";
            version =
              self.shortRev or "dirty-${toString self.lastModifiedDate}";
            src = self;
            cargoLock = {
              lockFile = ./Cargo.lock;
              outputHashes = {
                "h3-0.0.0" = "sha256-DsY0BEvEcXY4B0f9kWuJTxToXDi0KEONVeZQieFWLEo=";
                "hyper-reverse-proxy-0.5.2-dev" = "sha256-oAjDgY/J52tijLFIgqVyX8dNrBYlTSAuvyfF2pHWCVU=";
                "hyperlocal-0.8.0" = "sha256-8BreZsNrakLcq5gWz3PSUy4xFz22q69ogxgfAnJWbUs=";
              };
            };
          }) { };
      };

      packages =
        forAllSystems (system: { inherit (nixpkgsFor.${system}) httproxide; });
      defaultPackage = forAllSystems (system: self.packages.${system}.httproxide);
    };
}