From 66bbee3b81271cfb6ffff6d350c02d7158255778 Mon Sep 17 00:00:00 2001 From: Dan Lidral-Porter Date: Fri, 30 Mar 2018 16:33:14 -0700 Subject: [PATCH] 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. --- pkgs/development/libraries/gflags/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/libraries/gflags/default.nix b/pkgs/development/libraries/gflags/default.nix index d79b7691335..f9fc4366b7e 100644 --- a/pkgs/development/libraries/gflags/default.nix +++ b/pkgs/development/libraries/gflags/default.nix @@ -7,4 +7,13 @@ stdenv.mkDerivation 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; + }; }