26 stdenv.mkDerivation rec {
36 src = fetchFromGitHub {
37 owner = "rpm-software-management";
39 rev = "refs/tags/${version}";
40 hash = "sha256-XzPpjnmL2wwLZnLAJLuOQGWXAoCJnij14P6qSXglMhY=";
64 propagatedBuildInputs = [
71 # See https://github.com/NixOS/nixpkgs/issues/107430
73 cp ${libsolv}/share/cmake/Modules/FindLibSolv.cmake cmake/modules/
76 patches = [ ./fix-python-install-dir.patch ];
79 # https://github.com/rpm-software-management/libdnf/issues/1518
80 substituteInPlace libdnf/libdnf.pc.in \
81 --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
82 substituteInPlace cmake/modules/FindPythonInstDir.cmake \
83 --replace "@PYTHON_INSTALL_DIR@" "$out/${python.sitePackages}"
89 "-DPYTHON_DESIRED=${lib.head (lib.splitString [ "." ] python.version)}"
93 rm -r $out/${python.sitePackages}/hawkey/test
97 moveToOutput "lib/${python.libPrefix}" "$py"
101 description = "Package management library";
102 homepage = "https://github.com/rpm-software-management/libdnf";
103 changelog = "https://github.com/rpm-software-management/libdnf/releases/tag/${version}";
104 license = lib.licenses.gpl2Plus;
105 platforms = lib.platforms.linux ++ lib.platforms.darwin;
106 maintainers = with lib.maintainers; [