Skip to content

Commit

Permalink
Merge pull request #243437 from malt3/dnf5-5.0.15
Browse files Browse the repository at this point in the history
dnf5: init at 5.0.15
  • Loading branch information
drupol committed Jul 16, 2023
2 parents 0ccfe60 + ea14b7d commit 1cddc94
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 11 deletions.
5 changes: 5 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10047,6 +10047,11 @@
githubId = 2914269;
name = "Malo Bourgon";
};
malt3 = {
github = "malt3";
githubId = 1780588;
name = "Malte Poll";
};
malte-v = {
email = "[email protected]";
github = "malte-v";
Expand Down
32 changes: 21 additions & 11 deletions pkgs/development/libraries/libsolv/default.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
{ lib, stdenv, fetchFromGitHub, cmake, ninja, pkg-config
, zlib, xz, bzip2, zchunk, zstd
{ lib
, stdenv
, fetchFromGitHub
, cmake
, ninja
, pkg-config
, zlib
, xz
, bzip2
, zchunk
, zstd
, expat
, withRpm ? !stdenv.isDarwin, rpm
, withRpm ? !stdenv.isDarwin
, rpm
, db
}:

stdenv.mkDerivation rec {
version = "0.7.24";
version = "0.7.24";
pname = "libsolv";

src = fetchFromGitHub {
owner = "openSUSE";
repo = "libsolv";
rev = version;
owner = "openSUSE";
repo = "libsolv";
rev = version;
sha256 = "sha256-UTVnGJO/9mQF9RwK75hh6IkoP1MwAlFaLCtdYU8uS34=";
};

Expand All @@ -24,6 +34,7 @@ stdenv.mkDerivation rec {
"-DENABLE_ZCHUNK_COMPRESSION=true"
"-DWITH_SYSTEM_ZCHUNK=true"
] ++ lib.optionals withRpm [
"-DENABLE_COMPS=true"
"-DENABLE_PUBKEY=true"
"-DENABLE_RPMDB=true"
"-DENABLE_RPMDB_BYRPMHEADER=true"
Expand All @@ -36,10 +47,9 @@ stdenv.mkDerivation rec {

meta = with lib; {
description = "A free package dependency solver";
homepage = "https://github.com/openSUSE/libsolv";
license = licenses.bsd3;
platforms = platforms.linux ++ platforms.darwin;
homepage = "https://github.com/openSUSE/libsolv";
license = licenses.bsd3;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ copumpkin ];
};
}

94 changes: 94 additions & 0 deletions pkgs/tools/package-management/dnf5/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, createrepo_c
, gettext
, help2man
, pkg-config
, cppunit
, fmt
, glib
, json_c
, libmodulemd
, libpeas
, librepo
, libsmartcols
, libsolv
, libxml2
, rpm
, sdbus-cpp
, sqlite
, systemd
, toml11
, zchunk
}:

stdenv.mkDerivation (finalAttrs: {
pname = "dnf5";
version = "5.0.15";

src = fetchFromGitHub {
owner = "rpm-software-management";
repo = "dnf5";
rev = finalAttrs.version;
hash = "sha256-0MR9CJDFL1vbuO7FZyyn3PNb0p27oaho6I2eminTyYU=";
};

nativeBuildInputs = [ cmake createrepo_c gettext help2man pkg-config ];
buildInputs = [
cppunit
fmt
glib
json_c
libmodulemd
libpeas
librepo
libsmartcols
libsolv
libxml2
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"
# 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";
license = licenses.gpl2Plus;
maintainers = with lib.maintainers; [ malt3 ];
platforms = platforms.linux ++ platforms.darwin;
};
})
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,8 @@ with pkgs;

dec-decode = callPackage ../development/tools/dec-decode { };

dnf5 = callPackage ../tools/package-management/dnf5 { };

dsq = callPackage ../tools/misc/dsq { };

dtv-scan-tables = callPackage ../data/misc/dtv-scan-tables { };
Expand Down

0 comments on commit 1cddc94

Please sign in to comment.