2022-03-30 09:31:56 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
2022-03-30 09:31:56 +00:00
|
|
|
, cmake
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "civetweb";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "1.15";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-09-18 10:52:07 +00:00
|
|
|
sha256 = "sha256-Qh6BGPk7a01YzCeX42+Og9M+fjXRs7kzNUCyT4mYab4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
2021-03-09 03:18:52 +00:00
|
|
|
];
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
# The existence of the "build" script causes `mkdir -p build` to fail:
|
|
|
|
# mkdir: cannot create directory 'build': File exists
|
|
|
|
preConfigure = ''
|
|
|
|
rm build
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DCIVETWEB_ENABLE_CXX=ON"
|
|
|
|
"-DBUILD_SHARED_LIBS=ON"
|
|
|
|
|
|
|
|
# The civetweb unit tests rely on downloading their fork of libcheck.
|
|
|
|
"-DCIVETWEB_BUILD_TESTING=OFF"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
|
|
|
description = "Embedded C/C++ web server";
|
|
|
|
homepage = "https://github.com/civetweb/civetweb";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = [ lib.licenses.mit ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|