1 { lib, stdenv, fetchFromGitHub, cmake
2 , enableShared ? !stdenv.hostPlatform.isStatic
5 stdenv.mkDerivation rec {
9 src = fetchFromGitHub {
13 sha256 = "147i3md3nxkjlrccqg4mq1kyzc7yrhvqv5902iibc7znkvzdvlp0";
16 nativeBuildInputs = [ cmake ];
18 # This isn't used by the build and breaks the CMake build on case-insensitive filesystems (e.g., on Darwin)
19 preConfigure = "rm BUILD";
22 "-DGFLAGS_BUILD_SHARED_LIBS=${if enableShared then "ON" else "OFF"}"
23 "-DGFLAGS_BUILD_STATIC_LIBS=ON"
29 description = "A C++ library that implements commandline flags processing";
31 The gflags package contains a C++ library that implements commandline flags processing.
32 As such it's a replacement for getopt().
33 It was owned by Google. google-gflags project has been renamed to gflags and maintained by new community.
35 homepage = "https://gflags.github.io/gflags/";
36 license = licenses.bsd3;
37 maintainers = [ maintainers.linquize ];
38 platforms = platforms.all;