git.iko.soy/typeable/nixpkgs
on master help sign in
Revert "libmicrohttpd: Modernize"

This reverts commit c5d13d4fe96674a4fcb04b54ea552847302e13ee.

commit513bd8bd2226c6191b8086e1c1dac9198d8b8a84 authorEelco Dolstra <eelco.dolstra@logicblox.com> dateMon 1 Jun 2015, 21:38 (12 years ago) parenteae17c3
1 file changed+21−48
pkgs/development/libraries/libmicrohttpd/default.nix+21−48
pkgs/development/libraries/libmicrohttpd/default.nix+21−48
@@ -1,65 +1,38 @@
1−{ stdenv, fetchurl, pkgconfig
2−, curl
1+{stdenv, fetchurl, curl, libgcrypt}:
32
4−# Optional Dependencies
5−, openssl ? null, zlib ? null, libgcrypt ? null, gnutls ? null
6−}:
7−
8−let
9− mkFlag = trueStr: falseStr: cond: name: val:
10− if cond == null then null else
11− "--${if cond != false then trueStr else falseStr}${name}${if val != null && cond != false then "=${val}" else ""}";
12− mkEnable = mkFlag "enable-" "disable-";
13− mkWith = mkFlag "with-" "without-";
14− mkOther = mkFlag "" "" true;
15−
16− shouldUsePkg = pkg: if pkg != null && stdenv.lib.any (x: x == stdenv.system) pkg.meta.platforms then pkg else null;
17−
18− optOpenssl = shouldUsePkg openssl;
19− optZlib = shouldUsePkg zlib;
20− hasSpdy = optOpenssl != null && optZlib != null;
21−
22− optLibgcrypt = shouldUsePkg libgcrypt;
23− optGnutls = shouldUsePkg gnutls;
24− hasHttps = optLibgcrypt != null && optGnutls != null;
25−in
26−with stdenv.lib;
273stdenv.mkDerivation rec {
28− name = "libmicrohttpd-0.9.41";
4+ name = "libmicrohttpd-0.9.38";
295
306 src = fetchurl {
317 url = "mirror://gnu/libmicrohttpd/${name}.tar.gz";
32− sha256 = "0z3s3aplgxj8cj947i4rxk9wzvg68b8hbn71fyipc7aagmivx64p";
8+ sha256 = "08g7p4l0p2fsjj8ayl68zq1bqgrn0pck19bm8yd7k61whvfv9wld";
339 };
3410
35− nativeBuildInputs = [ pkgconfig ];
36− buildInputs = optional doCheck curl
37− ++ optionals hasSpdy [ optOpenssl optZlib ]
38− ++ optionals hasHttps [ optLibgcrypt optGnutls ];
11+ buildInputs = [ curl libgcrypt ];
3912
40− configureFlags = [
41− (mkWith true "threads" "posix")
42− (mkEnable true "doc" null)
43− (mkEnable false "examples" null)
44− (mkEnable true "epoll" "auto")
45− (mkEnable doCheck "curl" null)
46− (mkEnable hasSpdy "spdy" null)
47− (mkEnable true "messages" null)
48− (mkEnable true "postprocessor" null)
49− (mkWith hasHttps "gnutls" null)
50− (mkEnable hasHttps "https" null)
51− (mkEnable true "bauth" null)
52− (mkEnable true "dauth" null)
53− ];
13+ preCheck =
14+ # Since `localhost' can't be resolved in a chroot, work around it.
15+ '' for i in "src/test"*"/"*.[ch]
16+ do
17+ sed -i "$i" -es/localhost/127.0.0.1/g
18+ done
19+ '';
5420
5521 # Disabled because the tests can time-out.
5622 doCheck = false;
5723
5824 meta = {
5925 description = "Embeddable HTTP server library";
26+
27+ longDescription = ''
28+ GNU libmicrohttpd is a small C library that is supposed to make
29+ it easy to run an HTTP server as part of another application.
30+ '';
31+
32+ license = stdenv.lib.licenses.lgpl2Plus;
33+
6034 homepage = http://www.gnu.org/software/libmicrohttpd/;
61− license = licenses.lgpl2Plus;
62− platforms = platforms.all;
63− maintainers = with maintainers; [ wkennington ];
35+
36+ maintainers = [ ];
6437 };
6538}