Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / fuzzylite / default.nix
bloba3f70c062e867002768614bb80c7292b1522a65b
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , fetchpatch
5 , cmake
6 , ninja
7 , useFloat ? false
8 }:
10 stdenv.mkDerivation rec {
11   pname = "fuzzylite";
12   version = "6.0";
14   src = fetchFromGitHub {
15     owner = "fuzzylite";
16     repo = "fuzzylite";
17     rev = "v${version}";
18     hash = "sha256-i1txeUE/ZSRggwLDtpS8dd4uuZfHX9w3zRH0gBgGXnk=";
19   };
20   sourceRoot = "${src.name}/fuzzylite";
22   outputs = [ "out" "dev" ];
24   postPatch = ''
25     substituteInPlace CMakeLists.txt \
26       --replace "-Werror" "-Wno-error"
27   '';
29   nativeBuildInputs = [
30     cmake
31     ninja
32   ];
34   cmakeFlags = [
35     "-DFL_BUILD_TESTS:BOOL=OFF"
36     "-DFL_USE_FLOAT:BOOL=${if useFloat then "ON" else "OFF"}"
37   ];
39   meta = with lib; {
40     description = "A fuzzy logic control library in C++";
41     homepage = "https://fuzzylite.com";
42     changelog = "https://github.com/fuzzylite/fuzzylite/${src.rev}/release/CHANGELOG";
43     license = licenses.gpl3Only;
44     maintainers = with maintainers; [ azahi ];
45     platforms = platforms.all;
46   };