depot/third_party/nixpkgs/pkgs/build-support/mitm-cache/default.nix
Luke Granger-Brown f92e137cfb
Some checks failed
/ combine-systems (push) Blocked by required conditions
/ build (x86_64-linux) (push) Failing after 11m44s
/ build (aarch64-linux) (push) Failing after 11m50s
/ build (push) Failing after 16m42s
Merge commit '1e2ed035f4bebc9adad02b365508ad96f7df87c1' into HEAD
2025-03-02 02:23:32 +00:00

45 lines
1,016 B
Nix

{
lib,
stdenv,
fetchFromGitHub,
callPackage,
rustPlatform,
replaceVars,
openssl,
Security,
python3Packages,
}:
rustPlatform.buildRustPackage rec {
pname = "mitm-cache";
version = "0.1.2";
src = fetchFromGitHub {
owner = "chayleaf";
repo = "mitm-cache";
rev = "v${version}";
hash = "sha256-eY8mgmQB8wXQ7YJbLvdjXEEgGD+/RDywjvehJYf7ckE=";
};
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
Security
];
useFetchCargoVendor = true;
cargoHash = "sha256-DTPlPCumkVI2naYoNdO8T3pQNSawBA0FZ9LxVpqKqN0=";
setupHook = replaceVars ./setup-hook.sh {
inherit openssl;
ephemeral_port_reserve = python3Packages.ephemeral-port-reserve;
};
passthru.fetch = callPackage ./fetch.nix { };
meta = with lib; {
description = "A MITM caching proxy for use in nixpkgs";
homepage = "https://github.com/chayleaf/mitm-cache#readme";
license = licenses.mit;
maintainers = with maintainers; [ chayleaf ];
mainProgram = "mitm-cache";
};
}