2019-12-16 15:05:48 +03:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, enableShared ? true}:
|
2014-02-10 19:27:44 +04:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-07-25 12:27:43 +03:00
|
|
|
pname = "gflags";
|
2018-11-19 20:58:06 +03:00
|
|
|
version = "2.2.2";
|
2014-02-10 19:27:44 +04:00
|
|
|
|
2015-06-17 03:32:15 +03:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gflags";
|
|
|
|
repo = "gflags";
|
|
|
|
rev = "v${version}";
|
2018-11-19 20:58:06 +03:00
|
|
|
sha256 = "147i3md3nxkjlrccqg4mq1kyzc7yrhvqv5902iibc7znkvzdvlp0";
|
2014-02-10 19:27:44 +04:00
|
|
|
};
|
|
|
|
|
2015-06-17 03:32:15 +03:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2017-03-21 07:42:26 +03: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 03:32:15 +03:00
|
|
|
cmakeFlags = [
|
2019-12-16 15:05:48 +03:00
|
|
|
"-DGFLAGS_BUILD_SHARED_LIBS=${if enableShared then "ON" else "OFF"}"
|
|
|
|
"-DGFLAGS_BUILD_STATIC_LIBS=ON"
|
2015-06-17 03:32:15 +03:00
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = false;
|
2014-02-10 19:27:44 +04:00
|
|
|
|
2017-03-13 02:47:22 +03:00
|
|
|
meta = with stdenv.lib; {
|
2014-02-10 19:27:44 +04: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.
|
|
|
|
'';
|
2020-04-01 04:11:51 +03:00
|
|
|
homepage = "https://gflags.github.io/gflags/";
|
2017-03-13 02:47:22 +03:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.linquize ];
|
|
|
|
platforms = platforms.all;
|
2014-02-10 19:27:44 +04:00
|
|
|
};
|
|
|
|
}
|