nixpkgs/pkgs/tools/package-management/librepo/default.nix

65 lines
1.2 KiB
Nix
Raw Normal View History

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