biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / build-support / mitm-cache / default.nix
blobe3bce225b46b3db4182fe9410e37935bb19173a4
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , callPackage
5 , rustPlatform
6 , substituteAll
7 , openssl
8 , Security
9 , python3Packages
12 rustPlatform.buildRustPackage rec {
13   pname = "mitm-cache";
14   version = "0.1.1";
16   src = fetchFromGitHub {
17     owner = "chayleaf";
18     repo = "mitm-cache";
19     rev = "v${version}";
20     hash = "sha256-l9dnyA4Zo4jlbiCMRzUqW3NkiploVpmvxz9i896JkXU=";
21   };
23   buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
24     Security
25   ];
27   cargoHash = "sha256-6eYOSSlswJGR2IrFo17qVnwI+h2FkyTjLFvwf62nG2c=";
29   setupHook = substituteAll {
30     src = ./setup-hook.sh;
31     inherit openssl;
32     ephemeral_port_reserve = python3Packages.ephemeral-port-reserve;
33   };
35   passthru.fetch = callPackage ./fetch.nix { };
37   meta = with lib; {
38     description = "A MITM caching proxy for use in nixpkgs";
39     homepage = "https://github.com/chayleaf/mitm-cache#readme";
40     license = licenses.mit;
41     maintainers = with maintainers; [ chayleaf ];
42     mainProgram = "mitm-cache";
43   };