My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/development/libraries/cxxopts/default.nix

41 lines
1.1 KiB

{ lib
, stdenv
, fetchFromGitHub
, cmake
, icu
, pkg-config
, enableUnicodeHelp ? true
}:
stdenv.mkDerivation rec {
pname = "cxxopts";
version = "3.0.0";
src = fetchFromGitHub {
owner = "jarro2783";
repo = "cxxopts";
rev = "v${version}";
sha256 = "08x7j168l1xwj0r3rv89cgghmfhsx98lpq35r3vkh504m1pd55a6";
};
# CMake does not set CMAKE_LIBRARY_ARCHITECTURE variable in Nix, which breaks architecture-independent library path generation
patches = [ ./fix-install-path.patch ];
buildInputs = lib.optional enableUnicodeHelp [ icu.dev ];
cmakeFlags = [ "-DCXXOPTS_BUILD_EXAMPLES=OFF" ]
++ lib.optional enableUnicodeHelp "-DCXXOPTS_USE_UNICODE_HELP=TRUE";
nativeBuildInputs = [ cmake ] ++ lib.optional enableUnicodeHelp [ pkg-config ];
doCheck = true;
# Conflict on case-insensitive filesystems.
dontUseCmakeBuildDir = true;
meta = with lib; {
homepage = "https://github.com/jarro2783/cxxopts";
description = "Lightweight C++ GNU-style option parser library";
license = licenses.mit;
maintainers = [ maintainers.spease ];
platforms = platforms.all;
};
}