diff --git a/pkgs/tools/package-management/librepo/default.nix b/pkgs/tools/package-management/librepo/default.nix new file mode 100644 index 00000000000..21fc9fe97f5 --- /dev/null +++ b/pkgs/tools/package-management/librepo/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchFromGitHub, cmake, python, pkgconfig, expat, glib, pcre, openssl, curl, check, attr, gpgme }: + +stdenv.mkDerivation rec { + version = "1.7.18"; + name = "librepo-${version}"; + + src = fetchFromGitHub { + owner = "rpm-software-management"; + repo = "librepo"; + rev = name; + sha256 = "05iqx2kvfqsskb2r3n5p8f91i4gd4pbw6nh30pn532mgab64cvxk"; + }; + + patchPhase = '' + substituteInPlace librepo/python/python2/CMakeLists.txt \ + --replace ' ''${PYTHON_INSTALL_DIR}' " $out/lib/python2.7/site-packages" + ''; + + buildInputs = [ cmake python pkgconfig expat glib pcre openssl curl check attr gpgme ]; + + # librepo/fastestmirror.h includes curl/curl.h, and pkg-config specfile refers to others in here + propagatedBuildInputs = [ curl gpgme expat ]; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d904496b81c..674d5839251 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7726,6 +7726,8 @@ in librelp = callPackage ../development/libraries/librelp { }; + librepo = callPackage ../tools/package-management/librepo { }; + libresample = callPackage ../development/libraries/libresample {}; librevenge = callPackage ../development/libraries/librevenge {};