2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "civetweb";
|
2021-03-09 03:18:52 +00:00
|
|
|
version = "1.13";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-03-09 03:18:52 +00:00
|
|
|
sha256 = "/q7Q1lavIR3i126uI4NsKByHJ6Tp+DSN60R4YxR506U=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"WITH_CPP=1"
|
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
"LIBDIR=${placeholder "out"}/lib"
|
|
|
|
"INCLUDEDIR=${placeholder "dev"}/include"
|
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./0001-allow-setting-paths-in-makefile.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
installTargets = [
|
|
|
|
"install-headers"
|
|
|
|
"install-lib"
|
|
|
|
"install-slib"
|
|
|
|
"install"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $dev/include
|
|
|
|
mkdir -p $out/lib
|
|
|
|
'';
|
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|