nixpkgs-suyu/pkgs/development/libraries/gflags/default.nix
Dan Lidral-Porter 66bbee3b81 gflags: build on case-insensitive FSs, add meta
Darwin machines come with a case-insensitive filesystem by default. The
gflags package's source contains a file 'BUILD' and the build process
attempts to create a directory called 'build', which fails on
case-insensitive filesystems.

Add a prePatch hook to rename the BUILD file (which is for use with an
unrelated build tool) to something that doesn't conflict with the
'build' directory. This hook allows this derivation to be built on
case-insensitive filesystems.

Add metadata to the derivation because previously it had none.
2018-03-31 13:52:28 -07:00

19 lines
603 B
Nix

{ stdenv, fetchurl, cmake }:
stdenv.mkDerivation
{ name = "gflags-2.2.1";
src = fetchurl
{ url = "https://github.com/gflags/gflags/archive/v2.2.1.tar.gz";
sha256 = "03lxc2ah8i392kh1naq99iip34k4fpv22kwflyx3byd2ssycs9xf";
};
nativeBuildInputs = [ cmake ];
# for case-insensitive filesystems
prePatch = "mv BUILD BUILD.bazel";
meta = with stdenv.lib; {
description = "C++ library that implements commandline flags processing";
homepage = "https://github.com/gflags/gflags";
license = licenses.bsd3;
platforms = platforms.unix;
};
}