2015-06-17 02:32:15 +02:00
|
|
|
{ stdenv, fetchFromGitHub, cmake }:
|
2014-02-10 16:27:44 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-06-17 02:32:15 +02:00
|
|
|
name = "google-gflags-${version}";
|
2018-04-17 17:23:25 +02:00
|
|
|
version = "2.2.1";
|
2014-02-10 16:27:44 +01:00
|
|
|
|
2015-06-17 02:32:15 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gflags";
|
|
|
|
repo = "gflags";
|
|
|
|
rev = "v${version}";
|
2018-04-17 17:23:25 +02:00
|
|
|
sha256 = "12wkihc4f07qmhyqk3cjylj8v5xz2bjrq75p7aq1vvvj60fbp58k";
|
2014-02-10 16:27:44 +01:00
|
|
|
};
|
|
|
|
|
2015-06-17 02:32:15 +02:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2017-03-21 05:42:26 +01:00
|
|
|
# This isn't used by the build and breaks the CMake build on case-insensitive filesystems (e.g., on Darwin)
|
|
|
|
preConfigure = "rm BUILD";
|
|
|
|
|
2015-06-17 02:32:15 +02:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_SHARED_LIBS=ON"
|
|
|
|
"-DBUILD_STATIC_LIBS=ON"
|
|
|
|
"-DBUILD_TESTING=${if doCheck then "ON" else "OFF"}"
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = false;
|
2014-02-10 16:27:44 +01:00
|
|
|
|
2017-03-13 00:47:22 +01:00
|
|
|
meta = with stdenv.lib; {
|
2014-02-10 16:27:44 +01:00
|
|
|
description = "A C++ library that implements commandline flags processing";
|
|
|
|
longDescription = ''
|
|
|
|
The gflags package contains a C++ library that implements commandline flags processing.
|
|
|
|
As such it's a replacement for getopt().
|
|
|
|
It was owned by Google. google-gflags project has been renamed to gflags and maintained by new community.
|
|
|
|
'';
|
2017-03-13 00:47:22 +01:00
|
|
|
homepage = https://gflags.github.io/gflags/;
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.linquize ];
|
|
|
|
platforms = platforms.all;
|
2014-02-10 16:27:44 +01:00
|
|
|
};
|
|
|
|
}
|