From d70752cce9b0df5f2a9d4a1afb376e89869b1e7f Mon Sep 17 00:00:00 2001 From: Dan Peebles Date: Fri, 29 Apr 2016 03:06:02 +0000 Subject: [PATCH] libhif: init at 87e4cb24 The latest released version is too old for my needs, so I'm picking a git commit that works. I'll update it when they release a new one. --- .../package-management/libhif/default.nix | 29 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 pkgs/tools/package-management/libhif/default.nix diff --git a/pkgs/tools/package-management/libhif/default.nix b/pkgs/tools/package-management/libhif/default.nix new file mode 100644 index 000000000000..895165a1c1f7 --- /dev/null +++ b/pkgs/tools/package-management/libhif/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchFromGitHub, cmake, pkgconfig, autoconf, automake, libtool, expat, python, sphinx, gobjectIntrospection, librepo, check, rpm, libsolv, pcre, curl, gtk_doc, zlib, xz, elfutils }: + +stdenv.mkDerivation rec { + rev = "87e4cb247f5982fd48636691a955cc566d3110a3"; + name = "libhif-${stdenv.lib.strings.substring 0 7 rev}"; + + src = fetchFromGitHub { + inherit rev; + owner = "rpm-software-management"; + repo = "libhif"; + sha256 = "1g8hrqjawzwcx1gjcnv9sxg5i8l13dab3rr3i641k5vi76vv8miq"; + }; + + postPatch = '' + for file in python/hawkey/CMakeLists.txt python/hawkey/tests/module/CMakeLists.txt; do + substituteInPlace $file --replace ' ''${PYTHON_INSTALL_DIR}' " $out/${python.sitePackages}" + done + + # Until https://github.com/rpm-software-management/libhif/issues/43 is implemented, let's not force users to have this path + substituteInPlace libhif/hif-keyring.c \ + --replace '"/etc/pki/rpm-gpg"' 'getenv("LIBHIF_RPM_GPG_PATH_OVERRIDE") ? getenv("LIBHIF_RPM_GPG_PATH_OVERRIDE") : "/etc/pki/rpm-gpg"' + ''; + + buildInputs = [ cmake pkgconfig pcre expat python sphinx gobjectIntrospection gtk_doc librepo check rpm curl ]; + + # ibhif/hif-packagedelta.h includes solv/pool.h + propagatedBuildInputs = [ libsolv ]; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 674d5839251b..768da42ca7ec 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7650,6 +7650,8 @@ in libharu = callPackage ../development/libraries/libharu { }; + libhif = callPackage ../tools/package-management/libhif { sphinx = python27Packages.sphinx; }; + libHX = callPackage ../development/libraries/libHX { }; libibmad = callPackage ../development/libraries/libibmad { };