1{ lib, stdenv, fetchFromGitHub, cmake }:
2
3stdenv.mkDerivation rec {
4 pname = "args";
5 version = "6.4.6";
6
7 src = fetchFromGitHub {
8 owner = "Taywee";
9 repo = pname;
10 rev = version;
11 sha256 = "sha256-2gH3h3QAl0+XVULt/fR2UUGKNIxTUmnRRdxPOFdpVy4=";
12 };
13
14 nativeBuildInputs = [ cmake ];
15
16 # https://github.com/Taywee/args/issues/108
17 postPatch = ''
18 substituteInPlace CMakeLists.txt \
19 --replace '$'{CMAKE_INSTALL_LIBDIR_ARCHIND} '$'{CMAKE_INSTALL_LIBDIR}
20 substituteInPlace packaging/pkgconfig.pc.in \
21 --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
22 '';
23
24 meta = with lib; {
25 description = "A simple header-only C++ argument parser library";
26 homepage = "https://github.com/Taywee/args";
27 license = licenses.mit;
28 maintainers = with maintainers; [ SuperSandro2000 ];
29 };
30}