nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv
2, fetchFromGitHub
3}:
4
5stdenv.mkDerivation rec {
6 pname = "civetweb";
7 version = "1.11";
8
9 src = fetchFromGitHub {
10 owner = pname;
11 repo = pname;
12 rev = "v${version}";
13 sha256 = "1drnid6gs97cp9zpvsxz42yfj8djmgx98fg9p2993x9mpi547vzv";
14 };
15
16 makeFlags = [
17 "WITH_CPP=1"
18 "PREFIX=${placeholder "out"}"
19 "LIBDIR=${placeholder "out"}/lib"
20 "INCLUDEDIR=${placeholder "dev"}/include"
21 ];
22
23 patches = [
24 ./0001-allow-setting-paths-in-makefile.patch
25 ];
26
27 strictDeps = true;
28
29 outputs = [ "out" "dev" ];
30
31 preInstall = ''
32 mkdir -p $dev/include
33 mkdir -p $out/lib
34 '';
35
36 meta = {
37 description = "Embedded C/C++ web server";
38 homepage = "https://github.com/civetweb/civetweb";
39 license = [ stdenv.lib.licenses.mit ];
40 };
41}