Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6}: 7 8stdenv.mkDerivation rec { 9 pname = "civetweb"; 10 version = "1.15"; 11 12 src = fetchFromGitHub { 13 owner = "civetweb"; 14 repo = "civetweb"; 15 rev = "v${version}"; 16 sha256 = "sha256-Qh6BGPk7a01YzCeX42+Og9M+fjXRs7kzNUCyT4mYab4="; 17 }; 18 19 outputs = [ 20 "out" 21 "dev" 22 ]; 23 24 strictDeps = true; 25 26 nativeBuildInputs = [ 27 cmake 28 ]; 29 30 # The existence of the "build" script causes `mkdir -p build` to fail: 31 # mkdir: cannot create directory 'build': File exists 32 preConfigure = '' 33 rm build 34 ''; 35 36 cmakeFlags = [ 37 "-DBUILD_SHARED_LIBS=ON" 38 "-DCIVETWEB_ENABLE_CXX=ON" 39 "-DCIVETWEB_ENABLE_IPV6=ON" 40 41 # The civetweb unit tests rely on downloading their fork of libcheck. 42 "-DCIVETWEB_BUILD_TESTING=OFF" 43 ]; 44 45 meta = { 46 description = "Embedded C/C++ web server"; 47 mainProgram = "civetweb"; 48 homepage = "https://github.com/civetweb/civetweb"; 49 license = [ lib.licenses.mit ]; 50 }; 51}