nixpkgs/pkgs/servers/ttyd/default.nix
Sergei Trofimovich b7310fdc9b ttyd.tests: fix eval
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;
                 |              ^
2024-03-12 22:54:43 +00:00

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";
};
}