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