nixpkgs/pkgs/development/libraries/fmt/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

91 lines
1.8 KiB
Nix
Raw Normal View History

2024-07-13 13:29:17 +00:00
{
lib,
stdenv,
fetchFromGitHub,
cmake,
enableShared ? !stdenv.hostPlatform.isStatic,
2024-07-13 13:29:17 +00:00
# tests
mpd,
openimageio,
fcitx5,
spdlog,
}:
2020-10-23 13:39:26 +00:00
let
2024-07-13 13:29:17 +00:00
generic =
{
version,
hash,
2024-07-13 13:29:17 +00:00
patches ? [ ],
}:
2020-10-23 13:39:26 +00:00
stdenv.mkDerivation {
pname = "fmt";
inherit version;
2024-07-13 13:29:17 +00:00
outputs = [
"out"
"dev"
];
2020-05-01 17:54:51 +00:00
2020-10-23 13:39:26 +00:00
src = fetchFromGitHub {
owner = "fmtlib";
repo = "fmt";
rev = version;
inherit hash;
2020-10-23 13:39:26 +00:00
};
inherit patches;
nativeBuildInputs = [ cmake ];
2024-07-13 13:29:17 +00:00
cmakeFlags = [ "-DBUILD_SHARED_LIBS=${if enableShared then "ON" else "OFF"}" ];
2020-10-23 13:39:26 +00:00
doCheck = true;
passthru.tests = {
2024-07-13 13:29:17 +00:00
inherit
mpd
openimageio
fcitx5
spdlog
;
};
meta = with lib; {
2020-10-23 13:39:26 +00:00
description = "Small, safe and fast formatting library";
longDescription = ''
fmt (formerly cppformat) is an open-source formatting library. It can be
used as a fast and safe alternative to printf and IOStreams.
'';
2022-08-19 17:50:55 +00:00
homepage = "https://fmt.dev/";
2023-05-20 04:20:00 +00:00
changelog = "https://github.com/fmtlib/fmt/blob/${version}/ChangeLog.rst";
2020-10-23 13:39:26 +00:00
downloadPage = "https://github.com/fmtlib/fmt/";
maintainers = [ maintainers.jdehaas ];
2021-02-14 23:23:42 +00:00
license = licenses.mit;
2020-10-23 13:39:26 +00:00
platforms = platforms.all;
};
};
in
{
2021-07-07 01:08:35 +00:00
fmt_8 = generic {
version = "8.1.1";
hash = "sha256-leb2800CwdZMJRWF5b1Y9ocK0jXpOX/nwo95icDf308=";
2021-07-07 01:08:35 +00:00
};
2022-08-19 17:50:55 +00:00
fmt_9 = generic {
2022-10-30 02:43:51 +00:00
version = "9.1.0";
hash = "sha256-rP6ymyRc7LnKxUXwPpzhHOQvpJkpnRFOt2ctvUNlYI0=";
2022-08-19 17:50:55 +00:00
};
fmt_10 = generic {
version = "10.2.1";
hash = "sha256-pEltGLAHLZ3xypD/Ur4dWPWJ9BGVXwqQyKcDWVmC3co=";
};
2024-07-13 13:29:29 +00:00
fmt_11 = generic {
version = "11.0.2";
hash = "sha256-IKNt4xUoVi750zBti5iJJcCk3zivTt7nU12RIf8pM+0=";
2024-07-13 13:29:29 +00:00
};
}