2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config, cmake, xxd
|
2020-04-24 23:36:52 +00:00
|
|
|
, openssl, libwebsockets, json_c, libuv, zlib
|
2024-04-21 15:54:59 +00:00
|
|
|
, nixosTests
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
with builtins;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ttyd";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.7.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tsl0922";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
sha256 = "sha256-7e08oBKU7BMZ8328qCfNynCSe7LVZ88+iQZRRKl2YkY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config cmake xxd ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ openssl libwebsockets json_c libuv zlib ];
|
|
|
|
|
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit (nixosTests) ttyd;
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
|
|
|
description = "Share your terminal over the web";
|
|
|
|
homepage = "https://github.com/tsl0922/ttyd";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = [ lib.maintainers.thoughtpolice ];
|
2021-12-06 16:07:01 +00:00
|
|
|
platforms = lib.platforms.all;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "ttyd";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|