b7310fdc9b
Without the change `ttyd.tests` eval fails as: $ nix build --no-link -f. ttyd.tests error: undefined variable 'nixosTests' at /home/slyfox/dev/git/nixpkgs-master/pkgs/servers/ttyd/default.nix:24:14: 23| passthru.tests = { 24| inherit (nixosTests) ttyd; | ^
36 lines
850 B
Nix
36 lines
850 B
Nix
{ lib, stdenv, fetchFromGitHub
|
|
, pkg-config, cmake, xxd
|
|
, openssl, libwebsockets, json_c, libuv, zlib
|
|
, nixosTests
|
|
}:
|
|
|
|
with builtins;
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "ttyd";
|
|
version = "1.7.4";
|
|
src = fetchFromGitHub {
|
|
owner = "tsl0922";
|
|
repo = pname;
|
|
rev = "refs/tags/${version}";
|
|
sha256 = "sha256-BNvJkDOSlcNXt5W9/3/4I+MhQYn0W37zrJRYpAoZWaA=";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkg-config cmake xxd ];
|
|
buildInputs = [ openssl libwebsockets json_c libuv zlib ];
|
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
passthru.tests = {
|
|
inherit (nixosTests) ttyd;
|
|
};
|
|
|
|
meta = {
|
|
description = "Share your terminal over the web";
|
|
homepage = "https://github.com/tsl0922/ttyd";
|
|
license = lib.licenses.mit;
|
|
maintainers = [ lib.maintainers.thoughtpolice ];
|
|
platforms = lib.platforms.all;
|
|
mainProgram = "ttyd";
|
|
};
|
|
}
|