2022-07-29 15:25:36 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "argparse";
|
2022-09-22 08:36:25 +00:00
|
|
|
version = "2.9";
|
2022-07-29 15:25:36 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "p-ranav";
|
|
|
|
repo = "argparse";
|
|
|
|
rev = "v${version}";
|
2022-09-22 08:36:25 +00:00
|
|
|
sha256 = "sha256-vbf4kePi5gfg9ub4aP1cCK1jtiA65bUS9+5Ghgvxt/E=";
|
2022-07-29 15:25:36 +00:00
|
|
|
};
|
|
|
|
|
2022-11-01 02:27:17 +00:00
|
|
|
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@
|
|
|
|
'';
|
|
|
|
|
2022-07-29 15:25:36 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Argument Parser for Modern C++";
|
|
|
|
homepage = "https://github.com/p-ranav/argparse";
|
|
|
|
maintainers = with maintainers; [ _2gn ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|