Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.0 kB · 57 lines
Nix
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758{ lib, wrapPython, python, stdenv, dnf4, dnf-plugins-core, plugins ? [ dnf-plugins-core ],}:let pluginPaths = map (p: "${p}/${python.sitePackages}/dnf-plugins") plugins;
dnf4-unwrapped = dnf4;in
stdenv.mkDerivation { pname = "dnf4"; inherit (dnf4-unwrapped) version;
outputs = [ "out" "man" "py" ];
dontUnpack = true;
nativeBuildInputs = [ wrapPython ];
propagatedBuildInputs = [ dnf4-unwrapped ] ++ plugins;
makeWrapperArgs = lib.optional ( plugins != [ ] ) ''--add-flags "--setopt=pluginpath=${lib.concatStringsSep "," pluginPaths}"'';
installPhase = '' runHook preInstall
cp -R ${dnf4-unwrapped} $out cp -R ${dnf4-unwrapped.py} $py cp -R ${dnf4-unwrapped.man} $man
runHook postInstall '';
postFixup = '' wrapPythonPrograms '';
passthru = { unwrapped = dnf4-unwrapped; };
meta = dnf4-unwrapped.meta // { priority = (dnf4-unwrapped.meta.priority or lib.meta.defaultPriority) - 1; };}