nixpkgs/pkgs/tools/package-management/dnf5/default.nix
Paul Meyer 0890159e5c dnf5: 5.1.7 -> 5.1.8
Adding `libyaml`, as the following output was observed:

dnf5> -- Checking for module 'modulemd-2.0>=2.11.2'
dnf5> --   Found modulemd-2.0, version 2.15.0
dnf5> Package yaml-0.1 was not found in the pkg-config search path.
dnf5> Perhaps you should add the directory containing `yaml-0.1.pc'
dnf5> to the PKG_CONFIG_PATH environment variable
dnf5> Package 'yaml-0.1', required by 'modulemd-2.0', not found
2023-11-23 20:12:05 +01:00

98 lines
2.3 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, cmake
, createrepo_c
, gettext
, help2man
, pkg-config
, cppunit
, fmt
, json_c
, libmodulemd
, librepo
, libsmartcols
, libsolv
, libxml2
, libyaml
, pcre2
, rpm
, sdbus-cpp
, sqlite
, systemd
, toml11
, zchunk
}:
stdenv.mkDerivation (finalAttrs: {
pname = "dnf5";
version = "5.1.8";
src = fetchFromGitHub {
owner = "rpm-software-management";
repo = "dnf5";
rev = finalAttrs.version;
hash = "sha256-4ht2KraWKL774QPfZz1OgAuFtPVsMis9WiDS+QFP8JY=";
};
nativeBuildInputs = [ cmake createrepo_c gettext help2man pkg-config ];
buildInputs = [
cppunit
fmt
json_c
libmodulemd
librepo
libsmartcols
libsolv
libxml2
libyaml
pcre2.dev
rpm
sdbus-cpp
sqlite
systemd
toml11
zchunk
];
# workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329
NIX_CFLAGS_COMPILE = "-Wno-restrict -Wno-maybe-uninitialized";
cmakeFlags = [
"-DWITH_PERL5=OFF"
"-DWITH_PYTHON3=OFF"
"-DWITH_RUBY=OFF"
"-DWITH_TESTS=OFF"
# TODO: fix man installation paths
"-DWITH_MAN=OFF"
"-DWITH_PLUGIN_RHSM=OFF" # Red Hat Subscription Manager plugin
# the cmake package does not handle absolute CMAKE_INSTALL_INCLUDEDIR correctly
# (setting it to an absolute path causes include files to go to $out/$out/include,
# because the absolute path is interpreted with root at $out).
"-DCMAKE_INSTALL_INCLUDEDIR=include"
"-DCMAKE_INSTALL_LIBDIR=lib"
];
prePatch = ''
substituteInPlace dnf5daemon-server/dbus/CMakeLists.txt \
--replace '/etc' "$out/etc" \
--replace '/usr' "$out"
substituteInPlace dnf5daemon-server/polkit/CMakeLists.txt \
--replace '/usr' "$out"
substituteInPlace dnf5/CMakeLists.txt \
--replace '/etc/bash_completion.d' "$out/etc/bash_completion.d"
'';
dontFixCmake = true;
meta = with lib; {
description = "Next-generation RPM package management system";
homepage = "https://github.com/rpm-software-management/dnf5";
changelog = "https://github.com/rpm-software-management/dnf5/releases/tag/${version}";
license = licenses.gpl2Plus;
maintainers = with lib.maintainers; [ malt3 katexochen ];
mainProgram = "dnf5";
platforms = platforms.linux ++ platforms.darwin;
};
})