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