2021-08-19 15:16:50 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, doxygen
|
2023-05-16 19:28:41 +00:00
|
|
|
, gbenchmark
|
2021-08-19 15:16:50 +00:00
|
|
|
, graphviz
|
2023-05-16 19:28:41 +00:00
|
|
|
, gtest
|
2021-08-19 15:16:50 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ftxui";
|
2023-05-29 18:06:44 +00:00
|
|
|
version = "4.1.1";
|
2021-08-19 15:16:50 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ArthurSonzogni";
|
2022-07-10 17:18:40 +00:00
|
|
|
repo = "ftxui";
|
2022-03-08 20:20:54 +00:00
|
|
|
rev = "v${version}";
|
2023-05-29 18:06:44 +00:00
|
|
|
sha256 = "sha256-qFgCLV7sgGxlL18sThqpl+vyXL68GXcbYqMG7mXhsB4=";
|
2021-08-19 15:16:50 +00:00
|
|
|
};
|
|
|
|
|
2023-05-22 13:02:07 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2021-08-19 15:16:50 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
doxygen
|
|
|
|
graphviz
|
|
|
|
];
|
|
|
|
|
2023-05-22 13:02:07 +00:00
|
|
|
checkInputs = [
|
2023-05-16 19:28:41 +00:00
|
|
|
gtest
|
2023-05-22 13:02:07 +00:00
|
|
|
gbenchmark
|
2023-05-16 19:28:41 +00:00
|
|
|
];
|
|
|
|
|
2022-07-10 17:18:40 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DFTXUI_BUILD_EXAMPLES=OFF"
|
2023-05-16 19:28:41 +00:00
|
|
|
"-DFTXUI_BUILD_DOCS=ON"
|
2023-05-22 13:02:07 +00:00
|
|
|
"-DFTXUI_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
|
2022-07-10 17:18:40 +00:00
|
|
|
];
|
|
|
|
|
2023-05-22 13:02:07 +00:00
|
|
|
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
2022-03-08 20:20:54 +00:00
|
|
|
|
2021-08-19 15:16:50 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/ArthurSonzogni/FTXUI";
|
2022-03-08 20:20:54 +00:00
|
|
|
changelog = "https://github.com/ArthurSonzogni/FTXUI/blob/v${version}/CHANGELOG.md";
|
|
|
|
description = "Functional Terminal User Interface library for C++";
|
2021-08-19 15:16:50 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.ivar ];
|
2023-05-16 19:28:41 +00:00
|
|
|
platforms = platforms.all;
|
2021-08-19 15:16:50 +00:00
|
|
|
};
|
|
|
|
}
|