17 stdenv.mkDerivation (finalAttrs: {
21 src = fetchFromGitHub {
24 rev = "v${finalAttrs.version}";
25 hash = "sha256-p9g+b7Fqq8V6QSaikEQMMHWqBf4UtRA9a/VtH+s5JUM=";
29 # Support for rpm >= 4.19
31 url = "https://patch-diff.githubusercontent.com/raw/vmware/tdnf/pull/410.patch";
32 hash = "sha256-p/ix5O1J/lj2fw7qJokT+wPN4ROoulnVqByfxgFvuEo=";
50 propagatedBuildInputs = [
55 "-DCMAKE_INSTALL_PREFIX=$out"
56 "-DCMAKE_INSTALL_FULL_SYSCONDIR=$out/etc"
57 "-DCMAKE_INSTALL_SYSCONFDIR=$out/etc"
58 "-DSYSTEMD_DIR=$out/lib/systemd/system"
61 # error: format not a string literal and no format arguments [-Werror=format-security]
62 hardeningDisable = [ "format" ];
65 substituteInPlace CMakeLists.txt \
66 --replace-fail 'SYSCONFDIR /etc' 'SYSCONFDIR $out/etc' \
67 --replace-fail '/etc/motdgen.d' '$out/etc/motdgen.d'
68 substituteInPlace client/tdnf.pc.in \
69 --replace-fail 'libdir=''${prefix}/@CMAKE_INSTALL_LIBDIR@' 'libdir=@CMAKE_INSTALL_FULL_LIBDIR@'
70 substituteInPlace tools/cli/lib/tdnf-cli-libs.pc.in \
71 --replace-fail 'libdir=''${prefix}/@CMAKE_INSTALL_LIBDIR@' 'libdir=@CMAKE_INSTALL_FULL_LIBDIR@'
74 # remove binaries used for testing from the final output
75 postInstall = "rm $out/bin/*test";
78 description = "Tiny Dandified Yum";
79 homepage = "https://github.com/vmware/tdnf";
80 changelog = "https://github.com/vmware/tdnf/releases/tag/v${finalAttrs.version}";
81 license = with lib.licenses; [
85 maintainers = [ lib.maintainers.malt3 ];
87 # rpm only supports linux
88 platforms = lib.platforms.linux;