2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, ninja
|
|
|
|
, useFloat ? false
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "fuzzylite";
|
|
|
|
version = "6.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fuzzylite";
|
|
|
|
repo = "fuzzylite";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-i1txeUE/ZSRggwLDtpS8dd4uuZfHX9w3zRH0gBgGXnk=";
|
|
|
|
};
|
2023-08-04 22:07:22 +00:00
|
|
|
sourceRoot = "${src.name}/fuzzylite";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace CMakeLists.txt \
|
|
|
|
--replace "-Werror" "-Wno-error"
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
ninja
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DFL_BUILD_TESTS:BOOL=OFF"
|
|
|
|
"-DFL_USE_FLOAT:BOOL=${if useFloat then "ON" else "OFF"}"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Fuzzy logic control library in C++";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "fuzzylite";
|
2023-05-24 13:37:59 +00:00
|
|
|
homepage = "https://fuzzylite.com";
|
|
|
|
changelog = "https://github.com/fuzzylite/fuzzylite/${src.rev}/release/CHANGELOG";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ azahi ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|