Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, fetchFromGitHub 4, cmake 5}: 6 7stdenv.mkDerivation rec { 8 pname = "argagg"; 9 version = "0.4.6"; 10 11 src = fetchFromGitHub { 12 owner = "vietjtnguyen"; 13 repo = pname; 14 rev = version; 15 hash = "sha256-MCtlAPfwdJpgfS8IH+zlcgaaxZ5AsP4hJvbZAFtOa4o="; 16 }; 17 18 patches = [ 19 # Fix compilation of macro catch statement 20 ./0001-catch.diff 21 ]; 22 23 nativeBuildInputs = [ 24 cmake 25 ]; 26 27 meta = with lib; { 28 homepage = "https://github.com/vietjtnguyen/argagg"; 29 description = "Argument Aggregator"; 30 longDescription = '' 31 argagg is yet another C++ command line argument/option parser. It was 32 written as a simple and idiomatic alternative to other frameworks like 33 getopt, Boost program options, TCLAP, and others. The goal is to achieve 34 the majority of argument parsing needs in a simple manner with an easy to 35 use API. It operates as a single pass over all arguments, recognizing 36 flags prefixed by - (short) or -- (long) and aggregating them into easy to 37 access structures with lots of convenience functions. It defers processing 38 types until you access them, so the result structures end up just being 39 pointers into the original command line argument C-strings. 40 ''; 41 license = licenses.mit; 42 maintainers = with maintainers; [ AndersonTorres ]; 43 platforms = with platforms; all; 44 badPlatforms = [ "aarch64-darwin" ]; 45 }; 46}