summary refs log tree commit diff
path: root/pkgs/development/libraries/civetweb/default.nix
blob: fbbfb6ba73803fd9d35e268a66d865d197191a1f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{ lib, stdenv
, fetchFromGitHub
}:

stdenv.mkDerivation rec {
  pname = "civetweb";
  version = "1.13";

  src = fetchFromGitHub {
    owner = pname;
    repo = pname;
    rev = "v${version}";
    sha256 = "/q7Q1lavIR3i126uI4NsKByHJ6Tp+DSN60R4YxR506U=";
  };

  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" ];

  installTargets = [
    "install-headers"
    "install-lib"
    "install-slib"
    "install"
  ];

  preInstall = ''
    mkdir -p $dev/include
    mkdir -p $out/lib
  '';

  meta = {
    description = "Embedded C/C++ web server";
    homepage = "https://github.com/civetweb/civetweb";
    license = [ lib.licenses.mit ];
  };
}