depot/third_party/nixpkgs/pkgs/development/libraries/argparse/default.nix
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

32 lines
842 B
Nix

{ lib, stdenv, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
pname = "argparse";
version = "3.0";
src = fetchFromGitHub {
owner = "p-ranav";
repo = "argparse";
rev = "v${version}";
sha256 = "sha256-0fgMy7Q9BiQ/C1tmhuNpQgad8yzaLYxh5f6Ps38f2mk=";
};
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@
'';
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;
};
}