summary refs log tree commit diff
path: root/pkgs/tools/misc/websocat/default.nix
blob: b994aecfc0e0cf5f766c8d8a77a2c350b52c6fdd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ stdenv, fetchFromGitHub, pkgconfig, openssl, rustPlatform, Security
}:

rustPlatform.buildRustPackage rec {
  pname = "websocat";
  version = "1.3.0";

  src = fetchFromGitHub {
    owner  = "vi";
    repo   = "websocat";
    rev    = "v${version}";
    sha256 = "1gf2snr12vnx2mhsrwkb5274r1pvdrf8m3bybrqbh8s9wd83nrh6";
  };

  cargoBuildFlags = [ "--features=ssl" ];
  cargoSha256 = "1zqfvbihf8xwgh092n9wzm3mdgbv0n99gjsfk9przqj2vh7wfvh2";

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [ openssl ] ++ stdenv.lib.optional stdenv.isDarwin Security;

  meta = with stdenv.lib; {
    description = "Command-line client for WebSockets (like netcat/socat)";
    homepage    = https://github.com/vi/websocat;
    license     = with licenses; [ mit ];
    maintainers = [ maintainers.thoughtpolice ];
    platforms   = platforms.all;
  };
}