2017-02-08 18:48:21 +00:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, python2, pkgconfig, expat, glib, pcre, openssl, curl, check, attr, gpgme }:
|
2016-04-29 03:46:16 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-06-20 04:27:48 +01:00
|
|
|
version = "1.7.20";
|
2016-04-29 03:46:16 +01:00
|
|
|
name = "librepo-${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rpm-software-management";
|
|
|
|
repo = "librepo";
|
|
|
|
rev = name;
|
2017-06-20 04:27:48 +01:00
|
|
|
sha256 = "17fgj2wifn2qxmh1p285fbwys0xbvwbnmxsdfvqyr5njpyl2s99h";
|
2016-04-29 03:46:16 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace librepo/python/python2/CMakeLists.txt \
|
|
|
|
--replace ' ''${PYTHON_INSTALL_DIR}' " $out/lib/python2.7/site-packages"
|
|
|
|
'';
|
|
|
|
|
2017-06-20 04:27:48 +01:00
|
|
|
nativeBuildInputs = [ cmake pkgconfig ];
|
|
|
|
|
|
|
|
buildInputs = [ python2 expat glib pcre openssl curl check attr gpgme ];
|
2016-04-29 03:46:16 +01:00
|
|
|
|
|
|
|
# librepo/fastestmirror.h includes curl/curl.h, and pkg-config specfile refers to others in here
|
|
|
|
propagatedBuildInputs = [ curl gpgme expat ];
|
2016-04-30 17:01:26 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Library providing C and Python (libcURL like) API for downloading linux repository metadata and packages";
|
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ copumpkin ];
|
|
|
|
};
|
2016-04-29 03:46:16 +01:00
|
|
|
}
|
|
|
|
|