2021-02-04 06:26:32 +00:00
|
|
|
{ lib, stdenv, fetchurl, libxml2, pkg-config
|
2010-04-28 08:40:19 +00:00
|
|
|
, compressionSupport ? true, zlib ? null
|
|
|
|
, sslSupport ? true, openssl ? null
|
2020-12-20 06:11:26 +00:00
|
|
|
, static ? stdenv.hostPlatform.isStatic
|
|
|
|
, shared ? !stdenv.hostPlatform.isStatic
|
2010-04-28 08:40:19 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert compressionSupport -> zlib != null;
|
|
|
|
assert sslSupport -> openssl != null;
|
|
|
|
assert static || shared;
|
|
|
|
|
2012-06-06 21:47:26 +00:00
|
|
|
let
|
2021-01-21 17:00:13 +00:00
|
|
|
inherit (lib) optionals;
|
2012-06-06 21:47:26 +00:00
|
|
|
in
|
|
|
|
|
2010-04-28 08:40:19 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-02-04 06:26:32 +00:00
|
|
|
version = "0.31.2";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "neon";
|
2010-04-28 08:40:19 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-02-04 06:26:32 +00:00
|
|
|
url = "https://notroj.github.io/${pname}/${pname}-${version}.tar.gz";
|
|
|
|
sha256 = "0y46dbhiblcvg8k41bdydr3fivghwk73z040ki5825d24ynf67ng";
|
2010-04-28 08:40:19 +00:00
|
|
|
};
|
|
|
|
|
2012-06-06 21:47:26 +00:00
|
|
|
patches = optionals stdenv.isDarwin [ ./0.29.6-darwin-fix-configure.patch ];
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2017-09-05 21:26:13 +00:00
|
|
|
buildInputs = [libxml2 openssl]
|
2021-01-21 17:00:13 +00:00
|
|
|
++ lib.optional compressionSupport zlib;
|
2010-04-28 08:40:19 +00:00
|
|
|
|
2018-07-25 21:44:21 +00:00
|
|
|
configureFlags = [
|
2021-01-21 17:00:13 +00:00
|
|
|
(lib.enableFeature shared "shared")
|
|
|
|
(lib.enableFeature static "static")
|
|
|
|
(lib.withFeature compressionSupport "zlib")
|
|
|
|
(lib.withFeature sslSupport "ssl")
|
2018-07-25 21:44:21 +00:00
|
|
|
];
|
2010-04-28 08:40:19 +00:00
|
|
|
|
|
|
|
passthru = {inherit compressionSupport sslSupport;};
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2010-04-28 08:40:19 +00:00
|
|
|
description = "An HTTP and WebDAV client library";
|
2021-02-04 06:26:32 +00:00
|
|
|
homepage = "https://notroj.github.io/neon/";
|
|
|
|
changelog = "https://github.com/notroj/${pname}/blob/${version}/NEWS";
|
2018-10-25 19:34:08 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.lgpl2;
|
2010-04-28 08:40:19 +00:00
|
|
|
};
|
|
|
|
}
|