Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 48 lines 1.4 kB view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, cmake 5}: 6 7stdenv.mkDerivation rec { 8 pname = "argtable"; 9 version = "3.2.1"; 10 srcVersion = "v${version}.52f24e5"; 11 12 src = fetchFromGitHub { 13 owner = "argtable"; 14 repo = "argtable3"; 15 rev = srcVersion; 16 hash = "sha256-HFsk91uJXQ0wpvAQxP4/yZwRQx9kLH7KgB3Y/+zcZC0="; 17 }; 18 19 nativeBuildInputs = [ cmake ]; 20 21 cmakeFlags = [ 22 "-DBUILD_SHARED_LIBS=ON" 23 ]; 24 25 postPatch = '' 26 patchShebangs tools/build 27 ''; 28 29 meta = with lib; { 30 homepage = "https://github.com/argtable/argtable3"; 31 description = "A single-file, ANSI C command-line parsing library"; 32 longDescription = '' 33 Argtable is an open source ANSI C library that parses GNU-style 34 command-line options. It simplifies command-line parsing by defining a 35 declarative-style API that you can use to specify what your command-line 36 syntax looks like. Argtable will automatically generate consistent error 37 handling logic and textual descriptions of the command line syntax, which 38 are essential but tedious to implement for a robust CLI program. 39 ''; 40 license = with licenses; bsd3; 41 maintainers = with maintainers; [ AndersonTorres artuuge ]; 42 platforms = with platforms; all; 43 }; 44} 45# TODO: a NixOS test suite 46# TODO: multiple outputs 47# TODO: documentation 48# TODO: build both shared and static libs