depot/third_party/nixpkgs/pkgs/development/libraries/argparse/default.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

32 lines
842 B
Nix

{ lib, stdenv, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
pname = "argparse";
version = "3.1";
src = fetchFromGitHub {
owner = "p-ranav";
repo = "argparse";
rev = "v${version}";
sha256 = "sha256-JH9t/e/6RaSz+3LjmuNBYOy5gJT3zA+Vz4CxuwEXlvA=";
};
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;
};
}