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

38 lines
982 B
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, fetchpatch, cmake, enableShared ? true }:
stdenv.mkDerivation rec {
pname = "fmt";
2020-10-21 12:38:53 +01:00
version = "7.0.3";
2020-05-01 18:54:51 +01:00
outputs = [ "out" "dev" ];
src = fetchFromGitHub {
owner = "fmtlib";
repo = "fmt";
2019-09-09 00:38:31 +01:00
rev = version;
2020-10-21 12:38:53 +01:00
sha256 = "17q2fdzakk5p0s3fx3724gs5k2b5ylp8f1d6j2m3wgvlfldx9k9a";
};
nativeBuildInputs = [ cmake ];
cmakeFlags = [
"-DBUILD_SHARED_LIBS=${if enableShared then "ON" else "OFF"}"
"-DCMAKE_SKIP_BUILD_RPATH=OFF" # for tests
];
doCheck = true;
meta = with stdenv.lib; {
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.
'';
homepage = "http://fmtlib.net/";
downloadPage = "https://github.com/fmtlib/fmt/";
maintainers = [ maintainers.jdehaas ];
license = licenses.bsd2;
platforms = platforms.all;
};
}