@@ -0,0 +1,37 @@
1+{ stdenv, fetchFromGitHub
2+, pkgconfig, cmake, xxd
3+, openssl, libwebsockets, json_c, libuv
4+}:
5+
6+with builtins;
7+
8+let
9+ # ttyd hasn't seen a release in quite a while. remove all this
10+ # junk when a new one happens (eventually)
11+ revCount = 174;
12+ src = fetchFromGitHub {
13+ owner = "tsl0922";
14+ repo = "ttyd";
15+ rev = "6df6ac3e03b705ddd46109c2ac43a1cba439c0df";
16+ sha256 = "0g5jlfa7k6qd59ysdagczlhwgjfjspb3sfbd8b790hcil933qrxm";
17+ };
18+
19+in stdenv.mkDerivation rec {
20+ name = "ttyd-${version}";
21+ version = "1.4.2_pre${toString revCount}_${substring 0 8 src.rev}";
22+ inherit src;
23+
24+ nativeBuildInputs = [ pkgconfig cmake xxd ];
25+ buildInputs = [ openssl libwebsockets json_c libuv ];
26+ enableParallelBuilding = true;
27+
28+ outputs = [ "out" "man" ];
29+
30+ meta = {
31+ description = "Share your terminal over the web";
32+ homepage = https://github.com/tsl0922/ttyd;
33+ license = stdenv.lib.licenses.mit;
34+ maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
35+ platforms = stdenv.lib.platforms.linux;
36+ };
37+}