nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, fetchFromGitHub, cmake }:
2
3let
4 generic = { version, sha256 }:
5 stdenv.mkDerivation {
6 name = "spdlog-${version}";
7 inherit version;
8
9 src = fetchFromGitHub {
10 owner = "gabime";
11 repo = "spdlog";
12 rev = "v${version}";
13 inherit sha256;
14 };
15
16 nativeBuildInputs = [ cmake ];
17
18 cmakeFlags = [ "-DSPDLOG_BUILD_EXAMPLES=OFF" ];
19
20 outputs = [ "out" "doc" ];
21
22 postInstall = ''
23 mkdir -p $out/share/doc/spdlog
24 cp -rv ../example $out/share/doc/spdlog
25 '';
26
27 meta = with stdenv.lib; {
28 description = "Very fast, header only, C++ logging library.";
29 homepage = https://github.com/gabime/spdlog;
30 license = licenses.mit;
31 maintainers = with maintainers; [ obadz ];
32 platforms = platforms.all;
33 };
34 };
35in
36{
37 spdlog_1 = generic {
38 version = "1.2.1";
39 sha256 = "0gdj8arfz4r9419zbcxk9y9nv47qr7kyjjzw9m3ijgmn2pmxk88n";
40 };
41
42 spdlog_0 = generic {
43 version = "0.17.0";
44 sha256 = "112kfh4fbpm5cvrmgbgz4d8s802db91mhyjpg7cwhlywffnzkwr9";
45 };
46}