2021-08-18 13:19:15 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "args";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "6.4.6";
|
2021-08-18 13:19:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Taywee";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-02-02 18:25:31 +00:00
|
|
|
sha256 = "sha256-2gH3h3QAl0+XVULt/fR2UUGKNIxTUmnRRdxPOFdpVy4=";
|
2021-08-18 13:19:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
# https://github.com/Taywee/args/issues/108
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace CMakeLists.txt \
|
|
|
|
--replace '$'{CMAKE_INSTALL_LIBDIR_ARCHIND} '$'{CMAKE_INSTALL_LIBDIR}
|
|
|
|
substituteInPlace packaging/pkgconfig.pc.in \
|
|
|
|
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
|
|
|
|
'';
|
|
|
|
|
2021-08-18 13:19:15 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A simple header-only C++ argument parser library";
|
|
|
|
homepage = "https://github.com/Taywee/args";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
|
|
|
};
|
|
|
|
}
|