forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / by-name / ci / civetweb / package.nix
blobf6fe616957d6001eb74c25be597d7ef0bf0ad1a7
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , cmake
5 }:
7 stdenv.mkDerivation rec {
8   pname = "civetweb";
9   version = "1.15";
11   src = fetchFromGitHub {
12     owner = pname;
13     repo = pname;
14     rev = "v${version}";
15     sha256 = "sha256-Qh6BGPk7a01YzCeX42+Og9M+fjXRs7kzNUCyT4mYab4=";
16   };
18   outputs = [ "out" "dev" ];
20   strictDeps = true;
22   nativeBuildInputs = [
23     cmake
24   ];
26   # The existence of the "build" script causes `mkdir -p build` to fail:
27   #   mkdir: cannot create directory 'build': File exists
28   preConfigure = ''
29     rm build
30   '';
32   cmakeFlags = [
33     "-DBUILD_SHARED_LIBS=ON"
34     "-DCIVETWEB_ENABLE_CXX=ON"
35     "-DCIVETWEB_ENABLE_IPV6=ON"
37     # The civetweb unit tests rely on downloading their fork of libcheck.
38     "-DCIVETWEB_BUILD_TESTING=OFF"
39   ];
41   meta = {
42     description = "Embedded C/C++ web server";
43     mainProgram = "civetweb";
44     homepage = "https://github.com/civetweb/civetweb";
45     license = [ lib.licenses.mit ];
46   };