mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 23:54:01 +00:00
33 lines
842 B
Nix
33 lines
842 B
Nix
{ lib, stdenv, fetchFromGitHub, cmake }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "argparse";
|
|
version = "2.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "p-ranav";
|
|
repo = "argparse";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-vbf4kePi5gfg9ub4aP1cCK1jtiA65bUS9+5Ghgvxt/E=";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|