depot/third_party/nixpkgs/pkgs/development/libraries/fuzzylite/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

47 lines
1,005 B
Nix

{ 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=";
};
sourceRoot = "${src.name}/fuzzylite";
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; {
description = "Fuzzy logic control library in C++";
mainProgram = "fuzzylite";
homepage = "https://fuzzylite.com";
changelog = "https://github.com/fuzzylite/fuzzylite/${src.rev}/release/CHANGELOG";
license = licenses.gpl3Only;
maintainers = with maintainers; [ azahi ];
platforms = platforms.all;
};
}