Unverified Commit bf340ad2 authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

sandhole: init at 0.8.6 (#475557)

parents fcbdf4b4 9b9b533d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -7893,6 +7893,12 @@
    githubId = 5085029;
    name = "Emanuele Peruffo";
  };
  EpicEric = {
    email = "eric@eric.dev.br";
    github = "EpicEric";
    githubId = 3129194;
    name = "Eric Rodrigues Pires";
  };
  epireyn = {
    github = "epireyn";
    githubId = 48213068;
+53 −0
Original line number Diff line number Diff line
{
  cmake,
  fetchFromGitHub,
  lib,
  perl,
  rustPlatform,
  versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
  pname = "sandhole";
  version = "0.8.6";

  src = fetchFromGitHub {
    owner = "EpicEric";
    repo = "sandhole";
    tag = "v${finalAttrs.version}";
    hash = "sha256-30ltOQLobRy/M1v+0jFpBmH5ZkTmkZ+mQP7BX5RKo2s=";
  };

  cargoHash = "sha256-BE7y4VlvINWdJM4/36CDn4YxPWUQnT22YJtcvjup0Ec=";

  # All integration tests require networking.
  postPatch = ''
    echo "fn main() {}" > tests/integration/main.rs
  '';

  buildInputs = [ cmake ];
  nativeBuildInputs = [ perl ];

  useNextest = true;
  checkFlags = [
    # Some unit tests require networking.
    "--skip"
    "login"
  ];

  doInstallCheck = true;
  nativeInstallCheckInputs = [ versionCheckHook ];

  meta = {
    description = "Expose HTTP/SSH/TCP services through SSH port forwarding";
    longDescription = ''
      A reverse proxy that just works with an OpenSSH client.
      No extra software required to beat NAT!
    '';
    homepage = "https://sandhole.com.br";
    changelog = "https://github.com/EpicEric/sandhole/releases/tag/v${finalAttrs.version}";
    license = lib.licenses.mit;
    mainProgram = "sandhole";
    maintainers = with lib.maintainers; [ EpicEric ];
    platforms = lib.platforms.linux ++ lib.platforms.darwin;
  };
})