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