mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-02 19:14:14 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
48 lines
1005 B
Nix
48 lines
1005 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;
|
|
};
|
|
}
|