nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 19.03 39 lines 1.2 kB view raw
1{ stdenv, fetchFromGitHub, cmake }: 2 3stdenv.mkDerivation rec { 4 name = "google-gflags-${version}"; 5 version = "2.2.2"; 6 7 src = fetchFromGitHub { 8 owner = "gflags"; 9 repo = "gflags"; 10 rev = "v${version}"; 11 sha256 = "147i3md3nxkjlrccqg4mq1kyzc7yrhvqv5902iibc7znkvzdvlp0"; 12 }; 13 14 nativeBuildInputs = [ cmake ]; 15 16 # This isn't used by the build and breaks the CMake build on case-insensitive filesystems (e.g., on Darwin) 17 preConfigure = "rm BUILD"; 18 19 cmakeFlags = [ 20 "-DBUILD_SHARED_LIBS=ON" 21 "-DBUILD_STATIC_LIBS=ON" 22 "-DBUILD_TESTING=${if doCheck then "ON" else "OFF"}" 23 ]; 24 25 doCheck = false; 26 27 meta = with stdenv.lib; { 28 description = "A C++ library that implements commandline flags processing"; 29 longDescription = '' 30 The gflags package contains a C++ library that implements commandline flags processing. 31 As such it's a replacement for getopt(). 32 It was owned by Google. google-gflags project has been renamed to gflags and maintained by new community. 33 ''; 34 homepage = https://gflags.github.io/gflags/; 35 license = licenses.bsd3; 36 maintainers = [ maintainers.linquize ]; 37 platforms = platforms.all; 38 }; 39}