2020-02-08 02:33:05 +01:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, python
|
|
|
|
, pkgconfig
|
|
|
|
, libxml2
|
|
|
|
, glib
|
|
|
|
, openssl
|
2020-02-08 03:07:04 +01:00
|
|
|
, zchunk
|
2020-02-08 02:33:05 +01:00
|
|
|
, curl
|
|
|
|
, check
|
|
|
|
, gpgme
|
|
|
|
}:
|
2016-04-29 04:46:16 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-06-06 13:55:24 +02:00
|
|
|
version = "1.12.0";
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "librepo";
|
2016-04-29 04:46:16 +02:00
|
|
|
|
2020-02-08 03:07:04 +01:00
|
|
|
outputs = [ "out" "dev" "py" ];
|
|
|
|
|
2016-04-29 04:46:16 +02:00
|
|
|
src = fetchFromGitHub {
|
2020-02-08 02:33:05 +01:00
|
|
|
owner = "rpm-software-management";
|
|
|
|
repo = "librepo";
|
|
|
|
rev = version;
|
2020-06-06 13:55:24 +02:00
|
|
|
sha256 = "070zgay0cbw6jrkcfp4qql9f9ydd41ilwk39xdrp939b23gp112d";
|
2016-04-29 04:46:16 +02:00
|
|
|
};
|
|
|
|
|
2020-02-08 02:33:05 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkgconfig
|
|
|
|
];
|
2017-06-20 05:27:48 +02:00
|
|
|
|
2020-02-08 02:33:05 +01:00
|
|
|
buildInputs = [
|
|
|
|
python
|
|
|
|
libxml2
|
|
|
|
glib
|
|
|
|
openssl
|
2020-02-08 03:07:04 +01:00
|
|
|
zchunk
|
2020-02-08 02:33:05 +01:00
|
|
|
curl
|
|
|
|
check
|
|
|
|
gpgme
|
|
|
|
];
|
2016-04-29 04:46:16 +02:00
|
|
|
|
|
|
|
# librepo/fastestmirror.h includes curl/curl.h, and pkg-config specfile refers to others in here
|
2020-02-08 02:33:05 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
curl
|
|
|
|
gpgme
|
|
|
|
libxml2
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DPYTHON_DESIRED=${stdenv.lib.substring 0 1 python.pythonVersion}"
|
|
|
|
];
|
2016-04-30 18:01:26 +02:00
|
|
|
|
2020-02-08 03:07:04 +01:00
|
|
|
postFixup = ''
|
|
|
|
moveToOutput "lib/${python.libPrefix}" "$py"
|
|
|
|
'';
|
|
|
|
|
2016-04-30 18:01:26 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Library providing C and Python (libcURL like) API for downloading linux repository metadata and packages";
|
2020-02-08 02:33:05 +01:00
|
|
|
homepage = "https://rpm-software-management.github.io/librepo/";
|
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
2016-04-30 18:01:26 +02:00
|
|
|
maintainers = with maintainers; [ copumpkin ];
|
|
|
|
};
|
2016-04-29 04:46:16 +02:00
|
|
|
}
|