json-tui: init at 1.4.1 (#475088)

This commit is contained in:
Gaétan Lepage
2025-12-29 17:50:05 +00:00
committed by GitHub
2 changed files with 78 additions and 8 deletions
+9 -8
View File
@@ -2,6 +2,7 @@
lib,
stdenv,
fetchFromGitHub,
cmake,
doxygen,
gbenchmark,
@@ -9,14 +10,14 @@
gtest,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "ftxui";
version = "6.1.9";
src = fetchFromGitHub {
owner = "ArthurSonzogni";
repo = "ftxui";
tag = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-plJxTLhOhUyuay5uYv4KLK9UTmM2vsoda+iDXVa4b+k=";
};
@@ -33,20 +34,20 @@ stdenv.mkDerivation rec {
gbenchmark
];
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
cmakeFlags = [
(lib.cmakeBool "FTXUI_BUILD_EXAMPLES" false)
(lib.cmakeBool "FTXUI_BUILD_DOCS" true)
(lib.cmakeBool "FTXUI_BUILD_TESTS" doCheck)
(lib.cmakeBool "FTXUI_BUILD_TESTS" finalAttrs.doCheck)
];
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
meta = {
homepage = "https://github.com/ArthurSonzogni/FTXUI";
changelog = "https://github.com/ArthurSonzogni/FTXUI/blob/v${version}/CHANGELOG.md";
changelog = "https://github.com/ArthurSonzogni/FTXUI/blob/v${finalAttrs.version}/CHANGELOG.md";
description = "Functional Terminal User Interface library for C++";
license = lib.licenses.mit;
maintainers = [ ];
maintainers = with lib.maintainers; [ phanirithvij ];
platforms = lib.platforms.all;
};
}
})
+69
View File
@@ -0,0 +1,69 @@
{
lib,
stdenv,
fetchpatch2,
fetchFromGitHub,
cmake,
ftxui,
libargs,
nlohmann_json,
gtest,
gbenchmark,
versionCheckHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "json-tui";
version = "1.4.1";
src = fetchFromGitHub {
owner = "ArthurSonzogni";
repo = "json-tui";
tag = "v${finalAttrs.version}";
hash = "sha256-qS2EbCxH8sUUJMu5hwm1+Nu6SsJRfLReX56YSd1RZU4=";
};
patches = [
# fixes tests - https://github.com/ArthurSonzogni/json-tui/pull/37
(fetchpatch2 {
url = "https://github.com/ArthurSonzogni/json-tui/commit/645060a016c1e1ca84b9e1dc638a926415aaa5fe.patch?full_index=1";
hash = "sha256-8AZEZgU8HHyaasb/7LegSwRAMo1iyonv3XUY284nYKg=";
})
];
strictDeps = true;
buildInputs = [
ftxui
libargs
nlohmann_json
];
nativeBuildInputs = [ cmake ];
checkInputs = [ gbenchmark ];
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
cmakeFlags = [
"-Wno-dev" # suppress cmake warning about deprecated usage
(lib.cmakeBool "JSON_TUI_BUILD_TESTS" finalAttrs.doCheck)
(lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_GOOGLETEST" "${gtest.src}")
];
doInstallCheck = true;
versionCheckProgramArg = "--version";
nativeInstallCheckInputs = [ versionCheckHook ];
meta = {
homepage = "https://github.com/ArthurSonzogni/json-tui";
changelog = "https://github.com/ArthurSonzogni/json-tui/blob/v${finalAttrs.version}/CHANGELOG.md";
description = "JSON terminal UI made in C++";
license = lib.licenses.mit;
mainProgram = "json-tui";
maintainers = with lib.maintainers; [ phanirithvij ];
platforms = lib.platforms.all;
};
})